0

I have a php page that can be accessed by a user. When they access it, it will return some output. There are actions that don't affect the output, so I would like to find a way to separate those into a different script and have the first script run the second one separately so that the output can be returned faster.

user1755043
  • 281
  • 1
  • 13
  • 1
    [This][1] SA answer has a multitude of ways to do it. [1]: http://stackoverflow.com/questions/222414/asynchronous-shell-exec-in-php – CaffeinePowered Nov 20 '13 at 18:25

1 Answers1

1

well the easy way

exec('php script2.php > /dev/null &');

don't forget the path to script2 and sometimes php