Connecting Tech Pros Worldwide Help | Site Map

Executing another PHP script

  #1  
Old July 17th, 2005, 12:27 PM
Amir
Guest
 
Posts: n/a
Can one PHP script execute another PHP script?
  #2  
Old July 17th, 2005, 12:27 PM
Andy Hassall
Guest
 
Posts: n/a

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
  #3  
Old July 17th, 2005, 12:27 PM
Amir
Guest
 
Posts: n/a

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?

  #4  
Old July 17th, 2005, 12:27 PM
Andy Hassall
Guest
 
Posts: n/a

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
  #5  
Old July 17th, 2005, 12:27 PM
florent
Guest
 
Posts: n/a

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