$fileContent = file_get_contents("myfile.txt"); echo $fileContent;
$url = "https://www.example.com"; $fileContent = file_get_contents($url); echo $fileContent;In this example, we use file_get_contents to read the contents of a file from a remote server using the URL. We store the contents in the variable $fileContent and echo it using the echo statement. The PHP function file_get_contents is a part of the PHP Standard Library.