Skip to content

Instantly share code, notes, and snippets.

@itbj
Created January 26, 2014 09:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itbj/8630466 to your computer and use it in GitHub Desktop.
Save itbj/8630466 to your computer and use it in GitHub Desktop.
My PHP application to read file ,then put on the Web Browser. (2014/01/26)
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<body>
<?php
echo "My Cloud App!<br>我的云应用。<br>";
echo $showtime=date("Y-m-d H:i:s");
echo "<hr>";
$filename="yjm.txt";
if (file_exists($filename))
{
$file = fopen($filename, "r");
//输出文本中所有的行,直到文件结束为止。
while(! feof($file))
{ echo fgets($file,4096). "<br />";
}
fclose($file);
}
echo "--The End--";
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment