Skip to content

Instantly share code, notes, and snippets.

@itbj

itbj/t2.php

Created Jan 26, 2014
Embed
What would you like to do?
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
You can’t perform that action at this time.