Connecting Tech Pros Worldwide Help | Site Map

Executing another PHP script

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 11:27 AM
Amir
Guest
 
Posts: n/a
Default Executing another PHP script

Can one PHP script execute another PHP script?

  #2  
Old July 17th, 2005, 11:27 AM
Andy Hassall
Guest
 
Posts: n/a
Default 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, 11:27 AM
Amir
Guest
 
Posts: n/a
Default 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, 11:27 AM
Andy Hassall
Guest
 
Posts: n/a
Default 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, 11:27 AM
florent
Guest
 
Posts: n/a
Default 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


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.