..


Sponsored Links

How do I read the contents of a file using PHP?

There are several ways to read the contents of a file. The easiest way is, in my opinion, use the function file_get_contents () which allows to extract the entire contents of a file returned as a string.

Example:

 



 <? Php







 $ Text = file_get_contents ('/ songs / alba_chiara.txt');







 echo $ text;







 ?>

 

In the same category ...
E-Learning
Linux (Course) Linux (Course)
Complete guide to open-source system. From 49 €.
MySQL (Course) MySQL (Course)
Management of open-source database. From 39 €.
PHP (Course) PHP (Course)
Full course for creating dynamic Web sites. From 49 €.
Sponsored Links