Search notes:

PHP functions fopen(), fread() and fclose()

<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  <title>fopen fread fclose</title>
</head>
<body>

<code><pre>
<?php

  $f = fopen(__FILE__, 'r');

  while(!feof($f)) {

    $txt = fread($f, 1024);
    print htmlspecialchars($txt);

  }
  fclose($f);

?>
</pre></code>

</body>
</html>
Github repository about-php, path: /filesystem/fopen_fread_fclose.html

See also

PHP functions related to the filsystem

Index