$contents = file_get_contents("lola.txt");
echo $contents;
To insert a string to a file, use:
$text = "hello world\n This is lady gaga\n This is luna maya";
file_put_contents("lola.txt",$text); // return char of text// inserted
To know file size, use:
echo filesize("lola.txt");
No comments:
Post a Comment