Re: fopen() || Execute read file as php page; not plain text
| From: | CF High | Date: | Fri, 19 Sep 2003 23:38:55 +0000 |
| Subject: | Re: fopen() || Execute read file as php page; not plain text | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163218@lists.php.net to get a copy of this message | ||
Hey Jay.
Yes, the file is php code.
Ummmmm, why not use include()? I'm ashamed, and very pleased, to admit that
I had no idea I could set a var = to an include file!
Well, one learns something new each day, often with much head banging ;--)
Thanks for clueing me in.....
--Noah
"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B01AFA850@nemesis...
[snip]
was able to use an absolute reference on my local machine to execute
read
file contents; e.g. fopen('http://www.mysite.com/index.php',
'a'), but
on
the host webserver no such luck. Administrator said I can only use
relative
paths. Problem is, when I use a relative path, I just get plain text;
i.e.
the read file doesn't get executed as php.
eval()'s not an option either, as the read file(s) has apostrophes,
quotes
top-to-bottom.
Basically, I just need the file-to-be-read to have the queries within it
run
as if it were run in the web browser.
All clues appreciated as I'm at my wits end here -- can't find didly on
this
subject on the net.....
[/snip]
Is the file PHP code? If so, why not include()?