Can anyone tell me how can i execute a php script from......

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
radu
Forum Newbie
Posts: 4
Joined: Mon Jun 05, 2006 2:12 am

Can anyone tell me how can i execute a php script from......

Post by radu »

Can anyone tell me how can i execute a php script from another php script?
Thanks in advance!
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

require()
include()
require_once()
include_once()

is that what you mean? if you include it, all the code will also be executed soooo ya?
radu
Forum Newbie
Posts: 4
Joined: Mon Jun 05, 2006 2:12 am

Post by radu »

but how about using exec(), system(), can anyone tell me the correct way of using them
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

what do you mean by execute... if you have a function on another php page. and you want to run or execut that function all you need to do is include_once(); and then just have it call for that function.

if the page only has php, and you want that php to run on another page just use include(); and it will include, and run the php.
Post Reply