if i use exit () after an if else statement, inside the exit parameters, is it possible to include an external file?
example: if { //do something exit (include config.php); }
is this possible?
Thanks
Dominic Son
why not simply try?
I'm scared.. :bemused:
No it is not possible. Exit will simply treat the statement as a string and print that, it will not fetch the file contents. To do that, you would have to set a string var to the output/contents of config.php earlier in the script and then put the string var inside the exit($strvar)
Try this:
<?php if { //do something echo "do something..."; // Then include file include "config.php"; // then exit exit; }