Jump to content

Is it possible to "exit" the execution of an included file?


cgm225

Recommended Posts

Is it possible to "exit" the action/execution of an included file, but NOT the execution of the file that included it?  Restated, if I have:

 

SomeFile.php

  '--------------included AnotherFile.php

 

Is is possible to exit AnotherFile.php but continue on with executing SomeFile.php

 

Thanks in advance!

I didn't know return worked in the global scope like that.

 

I was about (so I'll carry on) to suggest making the included file into a function. Then just include it and call the function, and use return to do what you wanted, but if you don't need to make it into a function, that's just taken half the effort away.

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.