Forum Moderators: coopster

Message Too Old, No Replies

fopen, fwrite?

         

ToxinMan

6:51 am on Jan 20, 2008 (gmt 0)

10+ Year Member



Hey there
I have been looking around the web trying to find out what fopen,fwrite and fclose means but havent found anything usefull yet and wondering if you guys can help me?

I know that it opens a file or something, but could someone please give me a little example of what it does/what its usefull for!

$fp = fopen(/puplic_html/templates/userpages/ricky.php, "w");
fwrite($fp, $new_member_file);
fclose($fp);

Thanks heaps
Ricky

phranque

7:06 am on Jan 20, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], ToxinMan!

these are all php filesystem functions [php.net].

ToxinMan

7:16 am on Jan 20, 2008 (gmt 0)

10+ Year Member



so can you write over a .html/.php 's content permitly using fopen/fwrite from another .php?

venelin13

7:23 am on Jan 20, 2008 (gmt 0)

10+ Year Member



Basicly - yes, you can do it.

Well, it is related to the files and users permissions.

ToxinMan

7:45 am on Jan 20, 2008 (gmt 0)

10+ Year Member



ohok thanks guys!