Fastest way to read and write in to file in php

by rajesh 2014-05-13 20:22:44


Fastest way to read a file or write in to a file in php is to use the functions file_get_contents and file_put_contents

To read from a file use,
$str=file_get_contents('filename');
we can even use a http url instead of a filename. To write in to a file use,
file_put_contents('writefilename', $str);

Tagged in:

823
like
0
dislike
0
mail
flag

You must LOGIN to add comments