readfile("filename") function in PHP reads the content in any file.
<?php echo readfile("myfile.txt"); // it can be any file with extension ?>
CodeCry is a Code Repository comprised of codes from C, C++, Java, Python and many others.
Reading the contents in a file using PHP is quite simpler than any other languages.
readfile() -Reads a file.
fopen() - Opens a file .
fsockopen() - Open Internet connection.
file_get_contents() - Reads entire file into a string.