I wanna empty a text file, but for instance fputs($some_file, '') doesn't work, while fputs($fh, ' ') does. There seems something has to be written to the file to empty it - thus the file can never be completely empty. Any ideas on this paradox?
RTFM :p
http://be.php.net/manual/en/function.fopen.php :
'w+' - Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.
I think you can just do: $fp = fopen('/somefile.txt','w'); fclose($fp);
will create and empty file OR create and empty file on the server and just copy it to the file you need.
RTFM, that weak why do u think they have forums where not all as l33t as u