Last active
December 12, 2015 12:09
-
-
Save kasperhartwich/4769866 to your computer and use it in GitHub Desktop.
Execute command in background with php. For f.ex multithreading.
This file contains hidden or 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 | |
| function bg_exec($phpfile) { | |
| exec("nohup php " . $phpfile . " >/dev/null 2>&1 & echo $! &"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment