Answers for "display file with php"

PHP
3

read file data using php

<?php

$fh = fopen('filename.txt','r');
while ($line = fgets($fh)) {
  // <... Do your work with the line ...>
  // echo($line);
}
fclose($fh);
?>
Posted by: Guest on July-19-2021
0

php get and print file contents

<?php
// Read 14 characters starting from the 21st character
$section = file_get_contents('./people.txt', FALSE, NULL, 20, 14);
var_dump($section);
?>
Posted by: Guest on July-21-2021

Browse Popular Code Answers by Language