mgrayson Posted November 26, 2007 Share Posted November 26, 2007 I'm looking to essentially "fork" a "child php" file, using the exec() function in a "parent php" file... Some Criteria: (1) Consider parent.php, child.php, $myValue (2) parent.php passes $myValue to the "forked" child.php (3) parent.php does not wait on child.php to finish (hence the concept of "forking") (4) Do not need child.php to return values...output can go to null...child.php runs in the background. Goals (1) parent.php - proper syntax with exec function given criteria above... (2) child.php - code to properly "retrieve" the value of $myValue and use in remainder of code... please help in achieving the "Goals" above...feel free to ask for any additional details. I've been stuck on this one...thanks in advance. MG Link to comment https://forums.phpfreaks.com/topic/78955-exec-function-answer-and-win-a-gold-star/ Share on other sites More sharing options...
trq Posted November 26, 2007 Share Posted November 26, 2007 <?php $var = 'foo'; exec("child.php $var &"); ?> Link to comment https://forums.phpfreaks.com/topic/78955-exec-function-answer-and-win-a-gold-star/#findComment-399579 Share on other sites More sharing options...
mgrayson Posted November 26, 2007 Author Share Posted November 26, 2007 I'll give that a go... thorpe ... how do I handle / obtain the value of $var in child.php? Link to comment https://forums.phpfreaks.com/topic/78955-exec-function-answer-and-win-a-gold-star/#findComment-399673 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.