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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.