Re: fopen() || Execute read file as php page; not plain text

From: Date: Sat, 20 Sep 2003 02:05:57 +0000
Subject: Re: fopen() || Execute read file as php page; not plain text
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-163260@lists.php.net to get a copy of this message
On Fri, 19 Sep 2003 21:29:50 -0700 "CF High" <noah@newminddesign.com> wrote: > Re: "So you want to read from a file and write back to it? I don't > understand what you're trying to accomplish, execute a script and write the > result to file?" > > Yes, the read file is a nested set of queries that populates a js pop up > menu, the site navigational structure. That's why I need the read file to > be executed. So what was wrong with include $include_path? The fact that you include it doesn't mean you have to display it, just that you have access to its script. You can call a function from the file and use the result for whatever purpose you may chose without displaying a thing. > > Got help from a PHP guru -- he suggested shell access........ > > --Noah > > > "Andu" <php@archeopterix.com> wrote in message > news:20030919192426.219779d6.php@archeopterix.com... > > On Fri, 19 Sep 2003 18:20:01 -0700 > > "CF High" <noah@newminddesign.com> wrote: > > > > > Because I need to write $include_path content to file; not display it in > the > > > browser....... > > > > So you want to read from a file and write back to it? I don't understand > what > > you're trying to accomplish, execute a script and write the result to > file? > > > > > > > > --Noah > > > > > > > > > "Andu" <php@archeopterix.com> wrote in message > > > news:20030919180404.17e374d8.php@archeopterix.com... > > > > On Fri, 19 Sep 2003 17:05:47 -0700 > > > > "CF High" <noah@newminddesign.com> wrote: > > > > > > > > > Hmmmmm...... > > > > > > > > > > Looks like I was deluding myself. The only data returned by setting > a > > > var = > > > > > include $include_path, is 0 or 1. I'm looking for a few hundred > lines > > > of > > > > > evaluated text. Back to the drawing board. Christ, this is a pain > in > > > > > the..... > > > > > > > > Why do you need to set the $var, why not just include $include_path > > > when/where > > > > you need it in your script. > > > > > > > > > > > > > > --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('ƒm\ý½=Ù > > > > > ºeÇ4à‰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()? > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, visit: > > > > > http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > > > > > > > > > > > ____ > > > > Regards, Andu Novac > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > ____ > > Regards, Andu Novac > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- Andu

« previous php.general (#163260) next »