php open file and read contents code example Example: php file read <?php echo file_get_contents("text.txt"); ?>