Support Forums
Create an empty file on server - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21)
+---- Thread: Create an empty file on server (/showthread.php?tid=2634)



Create an empty file on server - zone - 11-06-2009

Credits and Source: http://www.dreamincode.net/

Name: Create an empty file on server
Description: This snippet will create an emty file on server using php function.
Snippet:

PHP Code:
<?php
 
/* You MUST make sure you have write permissions in the current directory
   If error reporting is on, it will throw a permission denied error */
 
$filename 'SuperCoderExtraordinaire.html';
touch$filename );
 
?>

Instructions: See the comments for instructions on how to use the page. It'll create a file called SuperCoderExtraordinare.html in the directory you run the php from.

That's it ;)
Thankyou for reading. Be happy always Smile


RE: Create an empty file on server - Extasey - 11-06-2009

You should explain what each part of the code does. That would make it a much better tutorial. Right now its pretty weak, but thank you for your share!


RE: Create an empty file on server - zone - 11-06-2009

(11-06-2009, 10:05 PM)Extasey Wrote: You should explain what each part of the code does. That would make it a much better tutorial. Right now its pretty weak, but thank you for your share!

It is simple just two lines of code. I have also wrote in the instructions;
zone Wrote:Instructions: See the comments for instructions on how to use the page. It'll create a file called SuperCoderExtraordinare.html in the directory you run the php from.
I think that explains it


RE: Create an empty file on server - Extasey - 11-06-2009

lol, dw




RE: Create an empty file on server - zone - 11-06-2009

Your spoiler doesn't opened. IE problem may be :S


RE: Create an empty file on server - Extasey - 11-07-2009

Nah, I just did it to get around the message to short thing. And I wans't listening to music so I didn't bother leaving you a little message Tongue.


RE: Create an empty file on server - zone - 11-07-2009

(11-07-2009, 12:05 AM)Extasey Wrote: Nah, I just did it to get around the message to short thing. And I wans't listening to music so I didn't bother leaving you a little message Tongue.

Yes, I didn't understand that either spoiler is not opening or its my IE problem Tongue


RE: Create an empty file on server - Extasey - 11-07-2009

THERES NOTHING IN THE SPOILER! ITS EMPTY!!
Your IE is fine.


RE: Create an empty file on server - zone - 11-07-2009

(11-07-2009, 12:43 AM)Extasey Wrote: THERES NOTHING IN THE SPOILER! ITS EMPTY!!
Your IE is fine.

I know Extasey, I know its empty as I checked this thread in FF also and saw that its have nothing in it Tongue