diogo Posted December 7, 2012 Posted December 7, 2012 I like to use this tecnique for my pages under construction: <?php if($user->id==40){ include("construction.inc"); }else{ // home code } but today it occurred to me to do simply this: <?php if($user->id==40) include("construction.inc");?> // home code and in the end of the included file: <?php exit; Is there any problem on doing this? I don't think there's something going on after the page is rendered, but just wanted to be sure...
Martijn Geerts Posted December 7, 2012 Posted December 7, 2012 don't know for sure. I use a simular: <?php if($user->id==40) { include("construction.inc"); die(); } ?>
ryan Posted December 7, 2012 Posted December 7, 2012 I think you are better off not exiting, just because any hooks that go after render theoretically wouldn't get executed. It's possible some other housekeeping might get missed. Doing a "return;" might be better.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now