Darren wrote:

> "m.aprea" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi everyone,
> >
> > I write a html page with a form with two parameter;
> > neckties (the unit-cost)  and the number of neckties, the action
> > associated to submit
> > is a PHP file "calculate.php" that writes to a remote file
> > "datafile.txt" as follows:
> >
> >           :
> >           :
> > Total cost of the neckties  <?php   $result = $neckties * $number;
> > echo $result;
> >                                          $fp =
> > fopen("http://localhost/examples/datafile.txt","w";);
> >        if (!$fp) {
> >        echo "<p>Unable to open remote file for writing.\n";
> >        exit;}
> >         fputs($fp,$result);
> >          fclose($fp);
> >           echo "total";
> >           echo $result;
> >                                              ?>
> >           :
> >           :
> >
> > When I call my html page and i give dates (e.g. 30 and 3) and click
> > submit, the file calculate.php
> > runs but i have the message:
> >
> > Total cost of the neckties 90
> > Warning: fopen("http://localhost/examples/datafile.txt","w";) - No error
> > in c:\webshare\wwwroot\examples\calculate.php on line 11
> >
> > Unable to open remote file for writing.
> >
> > The line 11 is that contains fopen.
> >
> > I have Win98, Apache 1.3.19, PHP4.
> >
> > Where is the problem, inside Apache or inside PHP4. I think inside
> > Apache, but whewre into the httpd.conf file ??
> > Thank you in advance
> >
> I am thinking thatyou don't have right access. Have you tried omitting the
> http header"
>
> --
> PHP Windows 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]

Hi Darren,

i  have tried omitting http, so the line 11 becomes :

$fp = fopen("c:/webshare/wwwwroot/examples/datafile.txt","w");

Is does not still work, and when i run it i have the warning message:

------------------------------------------------------------------
Total cost of the neckties 90
Warning: fopen("c:/webshare/wwwwroot/examples/datafile.txt","w") - No such
file or directory in c:\webshare\wwwroot\examples\calculate.php on line 11

Unable to open remote file for writing.
------------------------------------------------------------------


I don't understand where is the error ?

Thank you in advance






-- 
PHP Windows 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]

Reply via email to