Dear Jerry... Firstly, thank you for your help. There are some things that I have not understood. 1. If I want to make my web server (Apache) may write into "/srv/www/htdocs/iamsoft/ngitung.txt", how should I do that? 2. If I want to make a writable directory, how should I do that? 3. If I can also use symlink, how should I do that? Is it somewhat like "ln -s"? I am looking forward to your further explanation, thank you very much in advance.... --- Jerry Feldman <gfeldman@attbi.com> wrote:
On Mon, 24 Mar 2003 03:34:52 -0800 (PST) Prabu Subroto <prabu_subroto@yahoo.com> wrote:
Dear my friends...
I am writing a program to count how many time my homepage has been visited with PHP. The algorithm is: " if the visitor doesn't have the cookies, that means he/she just visited my homepage after the last time he/she close his/her internet browser. So I open my file which located in the directory of my homepage to read and increased the value inside it once. "
I am using SuSE Linux 8.1 and PHP 4.2.2.
But I'm stucked with these error message: " Warning: fopen("ngitung.txt", "w") - Permission denied in /srv/www/htdocs/iamsoft/isimuka.php on line 9 This appears to be the root of all your problems. You web server does not have write priviledge in the current directory, so ngitung.txt does not get written on the server. I might suggest you either make the directory writable, or (better) put ngitung.txt in another directory that is writable. You could set up a symlink to that directory so that so you don't have to change your code. (eg. set up the symlink to /tmp/ngitung.txt).
-- -- Gerald Feldman <gfeldman@attbi.com> Boston Computer Solutions and Consulting ICQ#156300 PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists/archive/suse-programming-e
__________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com