FOPEN

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
goblinhybrid
Forum Newbie
Posts: 8
Joined: Tue Dec 09, 2003 2:41 pm

FOPEN

Post by goblinhybrid »

if a file doesn't exist will fopen() create one by default? if not, how do i check if a file exists and create a new one??
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

yep, fopen will make a file if there ist one already, to see if a file exists you can use [php_man]file_exists[/php_man].
goblinhybrid
Forum Newbie
Posts: 8
Joined: Tue Dec 09, 2003 2:41 pm

Post by goblinhybrid »

thanks
is there a way to make a new file on its own?
also, is there a way to create a directory?
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

[google]file manipulation with php[/google]
[google]dir manipulation with php[/google]

above has tutorials on both subjects.

enjoy.
Post Reply