PHP file_get_contents() Function

PHP file_get_contents() Function

Hi,

How do i read the content of file using PHP program? So kindly provide any example or online help reference for filegetcontents() Function in PHP. Please feel free to suggest.

Thanks,

View Answers

February 17, 2011 at 6:40 PM

Hi,

For Reading the content of file in PHP we uses the filegetcontents() function of PHP language. This filegetcontents()function PHP is the best way to read the contents of a file.

Find the example of PHP filegetcontents() Function.

<?php

$string1=file_get_contents("c:/rose1/ram.txt");

echo $string1;

?>

Thanks,









Related Tutorials/Questions & Answers:

Ads