John,

Thanks, the code does actually read this but I'm afraid I removed it so the
servers ip is not exposed to the mail list.

The script runs correctly and opens and creates the page, however it cannot
find the include files I have in the page as the variable
$SITE_DOCUMENT_ROOT requires a session variable.

Zac
----- Original Message -----
From: "John Holmes" <[EMAIL PROTECTED]>
To: "'Zac Hillier'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, May 27, 2002 7:12 PM
Subject: RE: [PHP] fread and session vars


> Hi.
>
> > Code:
> >
> > generate page script:
> >
> > $pge = create-page.php
> > $pd = $HTTP_GET_VARS['pd'];
> >
> > # Set the files
> > $crtPge = "/". $pge ."?pd=". $pd; # the url of the dynamic page to
> write
> > the
> > output page
> > $targetfilename = $SITE_ DOCUMENT_ROOT . $outPge; # the output page
> >
> > # delete previous version of temp file if it exists
> > @unlink('temp.html');
> >
> > # open the dynamic page into dynpage
> > $dynpage = fopen($crtPge, 'r');
>
> Here it looks like $crtPge is going to be equal to something like
> "/create-page.php?pd=xx". If you want to open it via a URL, you need to
> add the HTTP:// and server name to it.
>
> $crtPge = http:// . $HTTP_SERVER_VARS['SERVER_NAME'] . "/" . $pge .
> "?pd=" . $pd;
>
> Something like that...then fopen() will work.
>
> ---John Holmes...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to