Re: [PHP] writing to file on server
unless that file you're writing to is on a different server, just put the relative location to the file. ie: ./guestbook.txt if this doesn't work I have nothing to offer you. :-\ - Original Message - From: Joeri Vankelst [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 22, 2001 7:43 AM Subject: [PHP] writing to file on server Hi, I've just started working with PHP. I've made a guest book using PHP (nothing spectacular) that worked just fine when I tested it op my pc, but when I uploaded it, it stopped working. My specific problem is that I cannot write to a file that already exists and contains data. When I try to I get these warnings: Warning: File already exists Warning: fopen(ftp:[EMAIL PROTECTED]/guestbook.txt,a;) - File exists Is this problem related to the FTP fopen? And is there a way to correct this problem? Tnx! Joeri Vankelst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] writing to file on server
When you are using that on your site, what basically happens is that you are trying to open an FTP session with yourself. Not too efficient. So just kill off the url and use the path to your file. -- Plutarck Should be working on something... ...but forgot what it was. ""Joeri Vankelst"" [EMAIL PROTECTED] wrote in message 9bujcv$gtm$[EMAIL PROTECTED]">news:9bujcv$gtm$[EMAIL PROTECTED]... Hi, I've just started working with PHP. I've made a guest book using PHP (nothing spectacular) that worked just fine when I tested it op my pc, but when I uploaded it, it stopped working. My specific problem is that I cannot write to a file that already exists and contains data. When I try to I get these warnings: Warning: File already exists Warning: fopen("ftp:[EMAIL PROTECTED]/guestbook.txt","a") - File exists Is this problem related to the FTP fopen? And is there a way to correct this problem? Tnx! Joeri Vankelst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] writing to file on server
But when I try using the path to the file I get denied permission ... How can I use my password then? Or can I bypass that in some way? ""Plutarck"" [EMAIL PROTECTED] wrote in message 9bupqt$b8s$[EMAIL PROTECTED]">news:9bupqt$b8s$[EMAIL PROTECTED]... When you are using that on your site, what basically happens is that you are trying to open an FTP session with yourself. Not too efficient. So just kill off the url and use the path to your file. -- Plutarck Should be working on something... ...but forgot what it was. ""Joeri Vankelst"" [EMAIL PROTECTED] wrote in message 9bujcv$gtm$[EMAIL PROTECTED]">news:9bujcv$gtm$[EMAIL PROTECTED]... Hi, I've just started working with PHP. I've made a guest book using PHP (nothing spectacular) that worked just fine when I tested it op my pc, but when I uploaded it, it stopped working. My specific problem is that I cannot write to a file that already exists and contains data. When I try to I get these warnings: Warning: File already exists Warning: fopen("ftp:[EMAIL PROTECTED]/guestbook.txt","a") - File exists Is this problem related to the FTP fopen? And is there a way to correct this problem? Tnx! Joeri Vankelst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] writing to file on server
On Sun, Apr 22, 2001 at 03:06:04PM -0700, Adam wrote: chmod the file to 777, this will allow anyone write permission to the file and thus you will be able to append to the file file-mode 777 is ugo=rwx. You want 'chmod 666', which is ugo=rw. read is 4 write is 2 execute is 1 If you want rw on the file, it's 6 not 7. -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]