I am going to create an empty text file (myfile.txt) at one folder of my web server.
All the process are done on web based.
how to do when using php exec command, thank you.
I am going to create an empty text file (myfile.txt) at one folder of my web server.
All the process are done on web based.
how to do when using php exec command, thank you.
If you have the right permission you can create an empty file just by opening it - without using exec(). example:
$fp = fopen("/home/me/subdir/myfile.txt", "a+");
fclose($fp);
fopen() in the "a+" - mode tries to open a file reading and writing, it attempts (!) to create this file, if it didn't exist before.
Michael aka Unique
try using the "touch" command.
touch filename.txt
That will create an empty file called filename.txt
Thank you, Michael aka Unique and Bill Van Pelt,