Welcome to findnerd, today we are going to discuss How the use file_get_contents() in PHP ?
Fistly let know what is use of file_get_contents() ?
The file_get_contents() basically reads a file into a string.
So we can say that file_get_contents Reads entire file into a string.
The file_get_contents() is a memory mapping techniques, if this is supported by the server,
to enhance performance.
syntax of file_get_contents()
file_get_contents(path);
You can take reference of bellow example:
<?php
//here call file_get_contents() and pass path
echo file_get_contents("file.txt");
?>
The output of the code above will be:
Hi all welcome to findnerd
0 Comment(s)