Read a file and write it to the output buffer in PHP

Description

The following code shows how to read a file and write it to the output buffer.

Example



<?php
   echo readfile("test.txt");
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    File »




Directory
DirectoryIterator
Drive
File
File Permission
File Read Save
FileSystemIterator
Path
Zip