file_get_contents and file_put_contents in php code example
Example 1: php get file contents
<?php
file_get_contents("file.txt");
?>
Example 2: php file_get_contents
<?php
$homepage = file_get_contents('http://www.example.com/');
echo $homepage;
?>
Example 3: php file_put_contents
file_put_contents ($filename, $data, $flags = 0, $context = null): int