Hi wen,
Make sure that the counter file is readable by the user apache or user
nobody which ever is your default webserver user. If it is not then just
chown it to nobody or chmod it to 777 and you are done.
Keyur
----- Original Message -----
From: "Keyur Kalaria" <[EMAIL PROTECTED]>
To: "Wen Ni" <[EMAIL PROTECTED]>
Sent: Tuesday, April 10, 2001 12:25 PM
Subject: Re: [PHP] page counter
> Hi
>
> Make sure that the counter file is readable by the user apache or user
> nobody which ever is your default webserver user.
> If it is not then just chown it to nobody or chmod it to 777 and you are
> done.
>
> Keyur
>
>
>
>
> ----- Original Message -----
> From: "Wen Ni" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 10, 2001 11:08 AM
> Subject: [PHP] page counter
>
>
> > I got an example from the internet about the PHP page counter. However
> > after several testing on the coding, I still met the problem which I
> > don't understand. Please help me.
> >
> > <?
> > $counter_file =
> > "/home/venus/public_html/qa/doccon/doc_distribution/count.txt";
> >
> > $counter_file_line = file($counter_file);
> >
> > $counter_file_line[0]++;
> >
> > print "counter=$counter_file_line\n";
> > $cf = fopen($counter_file,"w");
> > fputs($cf, "$counter_file_line[0]");
> > fclose($cf);
> >
> > echo $counter_file_line[0];
> >
> > ?>
> >
> > problems:
> >
> > Warning:
> >
fopen("/home/venus/public_html/qa/doccon/doc_distribution/count.txt","w")
> > - Permission denied in
> > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 9
> >
> > Warning: Unable to find file identifier 0 in
> > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 10
> >
> > Warning: Unable to find file identifier 0 in
> > /home/venus/public_html/qa/doccon/doc_distribution/New.php on line 11
> >
> >
> > ################
> >
> > Thanks
> >
> > from: Wendy
> >
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> > --
> > 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]