Saturday, May 20, 2017

File reading

<?php
$file_reader = fopen("sample_text.txt", "r");
while(!feof($file_reader)) {
 echo fgets($file_reader) . "<br/>";
}
?>
sample_text.txt:
This is 
php 
file reading example
Output:
This is 
php 
file reading example

No comments:

Post a Comment

here docs

$x = <<<THE_END PHP stands for "PHP: Hypertext Preprocessor". The acronym "PHP" is therefore, usually referre...