ksmatthews Posted October 17, 2007 Share Posted October 17, 2007 Hi Gurus, Is it at all possible to call a php script from within a php script ? This would be useful for long scripts I know that you can use the system() command to call executables. regards, Steven M Link to comment https://forums.phpfreaks.com/topic/73618-calling-php-scripts/ Share on other sites More sharing options...
~n[EO]n~ Posted October 17, 2007 Share Posted October 17, 2007 What do you mean by calling ??? You can include php files inside other php file include("includes/header.php"); Link to comment https://forums.phpfreaks.com/topic/73618-calling-php-scripts/#findComment-371401 Share on other sites More sharing options...
koolaid Posted October 17, 2007 Share Posted October 17, 2007 I know this is not my thread but if i include a php w/in another can i use variables from the script i include in the script it is included in? Link to comment https://forums.phpfreaks.com/topic/73618-calling-php-scripts/#findComment-371543 Share on other sites More sharing options...
envexlabs Posted October 17, 2007 Share Posted October 17, 2007 not 100%, but i'm sure you can. You could also declare it a global $variable. Link to comment https://forums.phpfreaks.com/topic/73618-calling-php-scripts/#findComment-371544 Share on other sites More sharing options...
adam291086 Posted October 17, 2007 Share Posted October 17, 2007 I think you can yes. I have a database conection file that i include in some php files. I then call on the variable $con; every time i want to conect to the database. This prevents me from having to type out the database connection every time. I am new to this and therefore could be wrong Link to comment https://forums.phpfreaks.com/topic/73618-calling-php-scripts/#findComment-371549 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.