Can one PHP script execute another PHP script?
Executing another PHP script
Collapse
This topic is closed.
X
X
-
AmirTags: None -
Andy Hassall
Re: Executing another PHP script
On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.solan@verizo n.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.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
-
Amir
Re: Executing another PHP script
Andy Hassall wrote:[color=blue]
> On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.solan@verizo n.net> wrote:
>
>[color=green]
>>Can one PHP script execute another PHP script?[/color]
>
>
> Yes.
>[/color]
How?
Comment
-
Andy Hassall
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@verizo n.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.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
Comment
-
florent
Re: Executing another PHP script
"Amir" <a.solan@verizo n.net> wrote in message
news:Kf9Pd.4859 2$g16.8786@trnd ny08...[color=blue]
> Can one PHP script execute another PHP script?[/color]
have a look at eval(...);
Florent
--
Comment
Comment