By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,854 Members | 856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,854 IT Pros & Developers. It's quick & easy.

Executing another PHP script

P: n/a
Can one PHP script execute another PHP script?
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.*****@verizon.net> wrote:
Can one PHP script execute another PHP script?


Yes.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

P: n/a
Andy Hassall wrote:
On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.*****@verizon.net> wrote:

Can one PHP script execute another PHP script?

Yes.


How?

Jul 17 '05 #3

P: n/a
On Fri, 11 Feb 2005 21:20:19 GMT, Amir <an****@verizon.net> wrote:
Andy Hassall wrote:
On Fri, 11 Feb 2005 21:15:22 GMT, Amir <a.*****@verizon.net> wrote:
Can one PHP script execute another PHP script?


Yes.


How?


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 / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #4

P: n/a


"Amir" <a.*****@verizon.net> wrote in message
news:Kf9Pd.48592$g16.8786@trndny08...
Can one PHP script execute another PHP script?


have a look at eval(...);

Florent
--
http://www.myoddweb.com
http://www.myoddweb.com/forum
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.