![]() |
The file_get_contents() function in PHP is an inbuilt function that is used to read a file into a string. The function uses memory mapping techniques that are supported by the server and thus enhance the performance making it a preferred way of reading the contents of a file. The path of the file to be read, which is sent as a parameter to the function and it returns the data read on success and FALSE on failure. |
<!DOCTYPE html>
<body> <?php // Reading contents from the // geeksforgeeks homepage $homepage = file_get_contents( "https://horje.com/"); echo $homepage; ?>
</body>
</html>
Category
: |
Web Tutorial |
Sub Category
: |
PHP URL/LINK Tutorial |
Uploaded by
: |
Admin |