Jump to content

Archived

This topic is now archived and is closed to further replies.

haewk

fopen trouble!

Recommended Posts

I'm having trouble with fopen.

I'm using:

$post = "ok, so i want to write this to my textfile";
$fd = fopen("guestbook.txt","a") or die ("Cannot open guestbook.txt");
fwrite($fd, $post);
fclose($fd);

I says that i don't have the permission :-(

Share this post


Link to post
Share on other sites
Did you CHMOD the permissions on that file you're trying to fopen() ? :-)

Share this post


Link to post
Share on other sites
[!--quoteo(post=350381:date=Feb 28 2006, 04:30 PM:name=Caesar)--][div class=\'quotetop\']QUOTE(Caesar @ Feb 28 2006, 04:30 PM) [snapback]350381[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Did you CHMOD the permissions on that file you're trying to fopen() ? :-)
[/quote]

I cerntantly did not :-) How do I do that? I'm quite a newbie :-)

Share this post


Link to post
Share on other sites
If you are on a Linux server, you can do it via your FTP client. Just right click on the file and select Properties/CHMOD & change the permissions accordingly. If it's a windows server, you will probably have to do it through your control panel.

Share this post


Link to post
Share on other sites
Right. Well, I don't own my own server, I'm using one of these net-servers you can sign up to and stuff. Is there no hope for me? Is there any other way?

Share this post


Link to post
Share on other sites
Do you have FTP access to the site?

Try connecting using an FTP client, with your site's user/pass. And your FTP server name as "yourdomain.com". (Where "yourdomain.com", is your actual domain. :-P)

If you still have problems with it...PM me, and I will help.

Are you allowed to change permissions via the site's control panel? Probably not...but you may want to check this.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.