RE: [PHP] fread and session vars
| From: | John Holmes | Date: | Mon, 27 May 2002 18:12:58 +0000 |
| Subject: | RE: [PHP] fread and session vars | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99387@lists.php.net to get a copy of this message | ||
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...