Skip to content

Instantly share code, notes, and snippets.

@hfhimage
Created September 20, 2013 14:59
Show Gist options
  • Save hfhimage/6638840 to your computer and use it in GitHub Desktop.
Save hfhimage/6638840 to your computer and use it in GitHub Desktop.
php 文件阅读
$filename = "myfile";
if (file_exists($filename) && is_readable ($filename)) {
$fh= fopen($filename, "r");
while (!feof($fh)) {
$line = fgets($fh);
echo $line;
}
fclose($fh);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment