Also, you're trying to fclose() a string. Should be:
Code:<html> <body> <?php $file="file.txt"; $fileo = fopen($file,"a"); fwrite($fileo,"Rocks Are Cool"); fclose($fileo); $filer = file_get_contents($file); echo $filer; ?> </body> </html>
Also, you're trying to fclose() a string. Should be:
Code:<html> <body> <?php $file="file.txt"; $fileo = fopen($file,"a"); fwrite($fileo,"Rocks Are Cool"); fclose($fileo); $filer = file_get_contents($file); echo $filer; ?> </body> </html>
- Mike
oops, should be more carefull what i give people...
Just saying but i tested boxertrumps script first and there is nothing wrong with it... why do i need to do mburt's script (Whats the difference ?)
i accidentally fclosed a string instead of the file handle.
please give examples on evrthing you are saying also explain please on what is a file handle (i think its fopen(rest) related)
$fileo = fopen($file,"a");
$fileo is a file handle.
"file.txt" is a string.
you can only close handles, not strings.
which i the script tried to do here
fclose($file);
Ok i see thanks !![]()
Bookmarks