haewk Posted February 28, 2006 Share Posted February 28, 2006 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 :-( Quote Link to comment Share on other sites More sharing options...
Caesar Posted February 28, 2006 Share Posted February 28, 2006 Did you CHMOD the permissions on that file you're trying to fopen() ? :-) Quote Link to comment Share on other sites More sharing options...
haewk Posted February 28, 2006 Author Share Posted February 28, 2006 [!--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 :-) Quote Link to comment Share on other sites More sharing options...
Caesar Posted February 28, 2006 Share Posted February 28, 2006 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. Quote Link to comment Share on other sites More sharing options...
haewk Posted February 28, 2006 Author Share Posted February 28, 2006 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? Quote Link to comment Share on other sites More sharing options...
haewk Posted February 28, 2006 Author Share Posted February 28, 2006 someone? Please? Quote Link to comment Share on other sites More sharing options...
Caesar Posted February 28, 2006 Share Posted February 28, 2006 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.