Home Answers Viewqa PHP PHP file_get_contents() Function

 
 


Hiteshkumar
PHP file_get_contents() Function
1 Answer(s)      2 years and 3 months ago
Posted in : PHP

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 Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.