Re: [PHP] Run or execute a php cript within a php cript.
On Fri, 21 Sep 2001 16:16, hvm wrote: Hi all. Is there a command to execute (run) from HTML or a php4 script a other php script without a mouse click (A HREF=xx.php). I have a lot of php scripts and need them to execute from a master php script. any help? Thanks all, Yours Hans. include() them? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA This is my favorite chinese soup, Tom said wantonly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Run or execute a php cript within a php cript.
You can do something like ?php # Master script switch ($Something) { case 1: include 'xx1.php'; break; case 2: include 'xx2.php'; break; # ...and so on } # ...include any 'post-processing PHP stuff here, if necessary ? Any variables in the master script's scope are in the scope of the included files as well. If you want to actually REDIRECT the user to another page, you can use the header function to send a Location: header. See http://www.php.net/manual/en/control-structures.switch.php http://www.php.net/manual/en/function.include.php http://www.php.net/manual/en/function.header.php for more information. -steve At 8:46 AM +0200 9/21/01, hvm wrote: Hi all. Is there a command to execute (run) from HTML or a php4 script a other php script without a mouse click (A HREF=xx.php). I have a lot of php scripts and need them to execute from a master php script. any help? Thanks all, Yours Hans. -- + Open source questions? + | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- http://pgfsun.ucdavis.edu/open-source-tools.html ---+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Run or execute a php cript within a php cript.
Hi all, Thanks a lot. Yours Hans -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]