2006/6/16, tedd <tedd@xxxxxxxxxxxx>:
Hi gang: So, there is NOT a way for one running php-application to call another and have it run while having the parent quit? For example, program "a" runs and presents the user with a web page. The user responds in some fashion (i.e., enters text) and clicks "Submit". Then the application analyzes the data and chooses to run application "d" from a list of possible applications. NOTE: This is different than the user clicking a link to run application "d". It is application "a" that's making the choice to run "d", not the user. Can this be done? Let me recap the solutions offered: 1. There was the suggestion to use includes(). However, includes simply adds code into the current application. It does not terminate the parent nor start another application. It simply bloats the parent. 2. There was the suggestion to use ob_start with header("Location: ..."); and finish with ob_flush. However, the parent application never shows itself -- the process simply cascades down to the end application. In this case, the parent (as in the example above) would never show the user the text-box to enter his/her text. 3. There was the suggestion to use js, which works and is the way I'm doing it now. However, I wanted a php solution. So, what say you fine php people, can anyone give me an example of a php application running (i.e., calling) another? I suspect that php can't, but I don't know why -- it doesn't seem logical. Is this one of those stateless problematic thingies, or what? Thanks. tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
You can fork a new process a run the other script in the child process. But forking is not always available so I also use another approach: emulate a web page request through sockets or curl to the script I want to run.