Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
1
10php
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yu Kimiduka
10php
Commits
aac957bc
Commit
aac957bc
authored
Jul 11, 2016
by
君塚 悠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
プログラム作成(guest_read.php,guest_read_r2.php:ゲストブック表示)
parent
8d40574b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
guest_read.php
php/php10/day05/guest_read.php
+22
-0
guest_read_r2.php
php/php10/day05/guest_read_r2.php
+25
-0
No files found.
php/php10/day05/guest_read.php
0 → 100644
View file @
aac957bc
<html>
<head>
<title>
ゲストブック
</title>
</head>
<body>
<h1
style=
"background: #cccccc"
>
ゲストブック(閲覧)
</h1>
<?php
$file
=
fopen
(
"guest.dat"
,
"r"
);
while
(
$row
=
fgetcsv
(
$file
,
104
,
"
\t
"
))
{
?>
<ol>
<li>
お名前:
<?php
print
(
$rou
[
1
]);
?>
</li>
<li>
メッセージ:
<?php
print
(
$row
[
2
]);
?>
</li>
<li>
書き込み日時:
<?php
print
(
$rou
[
0
]);
?>
</li>
</ol>
<hr
/>
<?php
}
fclose
(
$file
);
?>
</body>
</html>
\ No newline at end of file
php/php10/day05/guest_read_r2.php
0 → 100644
View file @
aac957bc
<html>
<head>
<title>
ゲストブック
</title>
</head>
<body>
<?php
$file
=
fopen
(
"guest.dat"
,
"r"
);
while
(
$row
=
fgetcsv
(
$file
,
104
,
"
\t
"
))
{
(
$data
[]
=
$row
);
}
fclose
(
$file
);
?>
<h1
style=
"background: #cccccc"
>
ゲストブック(閲覧)
</h1>
<?php
foreach
(
array_reverse
(
$data
)
as
$datum
)
{
?>
<ol>
<li>
お名前:
<?php
print
(
$rou
[
1
]);
?>
</li>
<li>
メッセージ:
<?php
print
(
$row
[
2
]);
?>
</li>
<li>
書き込み日時:
<?php
print
(
$rou
[
0
]);
?>
</li>
</ol>
<hr
/>
<?php
}
?>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment