Re: [PHP-WIN] Calling PHP from PHP

2007-04-12 Thread Jarrett Meyer
ansmission; however, several electrons were terribly inconvenienced. - Original Message From: Mikael Grön <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Sent: Thursday, April 12, 2007 10:41:28 AM Subject: Re: [PHP-WIN] Calling PHP from PHP If you're not using an external program or scrip

Re: [PHP-WIN] Calling PHP from PHP

2007-04-12 Thread Mikael Grön
If you're not using an external program or script to run all your php scripts, but want one script to execute another, then include or require are the only methods that'll do the job. Putting the include / require -part in the end of the first script is exactly the same as running them both afte

Re: [PHP-WIN] Calling PHP from PHP

2007-04-12 Thread Alf Stockton
Mikael Grön wrote: Sidenote: You can also do: $dir = "folder/of/include/files"; $files = opendir($dir); while ($file = readdir($file)): if (substr($file,-4) == '.php'): include_once($dir.'/'.$file); endif; endwhile; but I wouldn't recommend it. :P No neither would I recommend that

Re: [PHP-WIN] Calling PHP from PHP

2007-04-11 Thread Mikael Grön
Sidenote: You can also do: $dir = "folder/of/include/files"; $files = opendir($dir); while ($file = readdir($file)): if (substr($file,-4) == '.php'): include_once($dir.'/'.$file); endif; endwhile; but I wouldn't recommend it. :P Mike John Comerford skrev: Yes, what you have descr

Re: [PHP-WIN] Calling PHP from PHP

2007-04-11 Thread John Comerford
Yes, what you have described should work fine.. sam rumaizan wrote: 1- I have 50 php pages. 2- I want to include all 50 php pages in my main page. include("1.php"); .. include("50.php"); My question is: can I put all of the include php pages in one php page and sa

Re: [PHP-WIN] Calling PHP from PHP

2007-04-11 Thread sam rumaizan
1- I have 50 php pages. 2- I want to include all 50 php pages in my main page. include("1.php"); .. include("50.php"); My question is: can I put all of the include php pages in one php page and save it as includepages.php then include this php page to my main page includ

Re: [PHP-WIN] Calling PHP from PHP

2007-04-11 Thread Hartleigh Burton
Not sure if i understand properly... you don't want to use the include () function or you don't want to have the code of script B in script A? If it is the later you can use include("path/to/scriptB.php"); or require("path/to/scriptB.php"); you can also use include_once() and require_once()