Created
September 7, 2017 12:20
-
-
Save makgithub/82a7ab94b742fc7fa241745f4374e5de to your computer and use it in GitHub Desktop.
PHP popen function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This is the child process, it'll be launched | |
* from the parent process. | |
*/ | |
/* Do some work */ | |
echo "large process is running"; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "\n doning the work in Main file\n"; | |
echo date("h:i:s");echo "\n"; | |
$commandName="/var/www/html/main.php"; //Provide full path of the php file | |
$handle = popen('php ' . $commandName , 'r'); | |
echo date("h:i:s"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment