Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to to read a file in php ?
If you want to read a file in php the you should use readfile() function.
This function reads a file and writes it to the output buffer.
It is very simple and easy function to read a php file.
you can take reference of below example:
<?php
//here call readfile() finction and print file
echo readfile("file.txt");
?>
The output of the code above will be:
Hi all welcome to findnerd 27
0 Comment(s)