Creating a blank file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Bennettman
Forum Contributor
Posts: 130
Joined: Sat Jun 15, 2002 3:58 pm

Creating a blank file

Post by Bennettman »

Are there functions to delete files and to create blank files on the server with a specified filename?
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

delete files:
http://php.net/unlink

make a blank file:
http://php.net/fopen

fopen() will try to make the file if the file you try to open does not exist.
Bennettman
Forum Contributor
Posts: 130
Joined: Sat Jun 15, 2002 3:58 pm

Post by Bennettman »

Thanks a lot ^^ I was using those two functions anyway and made a couple other mistakes, but thanks for letting me make sure they were the right ones.
Post Reply