Jump to content

php script that triggers another script to run


shericn

Recommended Posts

Hi,

 

I'm working on a php script. I would like this script to call another script and not wait for the other script to finish executing. For example, if my script is like this,

 

<?php

print "Data Written";

require("otherscript.php");

?>

 

I want this script to finish its execution right after calling "otherscript.php" no matter if "otherscript.php" is successful or not. However, as of now, this script would wait until "otherscript.php" is finished. Is there a way to go around that?

 

Thanks.

-shericn

Hi,

 

I read about include() before, but it appears that the only difference between include() and require() is that include() does not throw error messages. However, what I want is to make it so that after I call include() another php script, the current php script exits right away without waiting for the include() file to finish its execution (no matter how long that will take). Is there a way to do that?

 

Thanks.

-shericn

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.