PHP - How to read content of a file

PHP can read the content of files such as txt, doc, etc and can be displays it onto the web page as a HTML document.

Syntax:
  readfile(<filename>);



Ex:
<?php
  $filename = "http://localhost/readme.txt"
  readfile($filename);
?>


No comments:

Post a Comment