Jump to content

Question about exit() function


hadoob024

Recommended Posts

I have a question regarding the exit() function. I read the manual on this, but it didn't really answer my question. Suppose I have the following:

Script1.php:
[code]
require 'Script2.php';
blahblahblah();
echo 'junk';
[/code]


And Script2.php:
[code]
function blahblahblah()
{
       exit;
}
[/code]


So basically my question is, when exit() gets called from within Script2.php, does it just stop the execution of Script2.php? Or does it also stop the execution of Script1.php? Thanks!
Link to comment
https://forums.phpfreaks.com/topic/4050-question-about-exit-function/
Share on other sites

cool. thanks. yeah, i should've just followed my own example. in my real script, the main script exits anyway, so i couldn't tell what was causing the script to end, just it running to completion, or the exit() being called in the included script.

the closer i'm getting to this thing being done, the more re-assurance i need that something is correct. it's like i'm a 5 year old or something :)

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.