show file please
This commit is contained in:
parent
2265ffb3f2
commit
634df4995f
1 changed files with 20 additions and 17 deletions
37
index.php
37
index.php
|
@ -162,16 +162,6 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<!--<h1 class="feed-header">Farp highlights</h1>-->
|
||||
|
||||
<div class="post">
|
||||
Furp social is currently under construction as we implement oekaki farping. Come back soon!
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content-column">
|
||||
|
||||
<!-- save most recent signature as a cookie and autoload on page load -->
|
||||
<script>
|
||||
function logSignature() {
|
||||
|
@ -187,6 +177,16 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<!--<h1 class="feed-header">Farp highlights</h1>-->
|
||||
|
||||
<div class="post">
|
||||
Furp social is currently under construction as we implement oekaki farping. Come back soon!
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="content-column">
|
||||
|
||||
<!-- feed display -->
|
||||
<h1 class="feed-header">Global Feed</h1>
|
||||
<span class="post" id="refresh" onclick="window.location.href = 'index.php'">refresh feed</span>
|
||||
|
@ -200,19 +200,22 @@
|
|||
<?php
|
||||
// ensure the file exists before attempting to read from it
|
||||
if (!file_exists("posts.txt")) {
|
||||
$myfile = fopen("posts.txt", "a");
|
||||
$myfile = fopen("posts.txt", "w");
|
||||
fclose($myfile);
|
||||
}
|
||||
|
||||
// show content
|
||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
|
||||
if ($myfile) {
|
||||
while (($line = fgets($myfile)) !== false) {
|
||||
echo $line;
|
||||
}
|
||||
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;
|
||||
// }
|
||||
|
||||
fclose($myfile);
|
||||
}
|
||||
// fclose($myfile);
|
||||
// }
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
|
Reference in a new issue