Connecting Tech Pros Worldwide Forums | Help | Site Map

Executing another PHP script

Amir
Guest
 
Posts: n/a
#1: Jul 17 '05
Can one PHP script execute another PHP script?

Andy Hassall
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Executing another PHP script


On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.solan@verizon.net> wrote:
[color=blue]
>Can one PHP script execute another PHP script?[/color]

Yes.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Amir
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Executing another PHP script


Andy Hassall wrote:[color=blue]
> On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.solan@verizon.net> wrote:
>
>[color=green]
>>Can one PHP script execute another PHP script?[/color]
>
>
> Yes.
>[/color]

How?

Andy Hassall
Guest
 
Posts: n/a
#4: Jul 17 '05

re: Executing another PHP script


On Fri, 11 Feb 2005 21:20:19 GMT, Amir <anyone@verizon.net> wrote:
[color=blue]
>Andy Hassall wrote:[color=green]
>> On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.solan@verizon.net> wrote:
>>[color=darkred]
>>>Can one PHP script execute another PHP script?[/color]
>>
>> Yes.[/color]
>
>How?[/color]

Depends where it is.

include(), require(), fpassthru(), exec() are all candidates.

include or require would be the preferred way, since it's all in the same PHP
interpreter.

fpassthru() could be used to get the output of a PHP script from another
server, fetched over HTTP.

exec() could be a last resort, starting up a separate PHP command-line
interpreter. Not really a good option.

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
florent
Guest
 
Posts: n/a
#5: Jul 17 '05

re: Executing another PHP script




"Amir" <a.solan@verizon.net> wrote in message
news:Kf9Pd.48592$g16.8786@trndny08...[color=blue]
> Can one PHP script execute another PHP script?[/color]

have a look at eval(...);

Florent
--
http://www.myoddweb.com
http://www.myoddweb.com/forum


Closed Thread