Update index.php
This commit is contained in:
parent
459cdeb4f9
commit
a26be8b276
1 changed files with 6 additions and 9 deletions
15
index.php
15
index.php
|
@ -206,16 +206,13 @@
|
|||
|
||||
// show content
|
||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||
echo fread($myfile,filesize("posts.txt"));
|
||||
fclose($myfile);
|
||||
// $myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||
// if ($myfile) {
|
||||
// while (($line = fgets($myfile)) !== false) {
|
||||
// echo $line;
|
||||
// }
|
||||
if ($myfile) {
|
||||
while (($line = fgets($myfile)) !== false) {
|
||||
echo $line;
|
||||
}
|
||||
|
||||
// fclose($myfile);
|
||||
// }
|
||||
fclose($myfile);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
|
Reference in a new issue