Page 1 of 1

require problem

Posted: Sat Aug 09, 2003 10:44 am
by CrazyJimmy
Hello,

I have a script that checks a user is logged in, i require this at the top of every member page I have, this works fine. If user is not logged in then the script exits, if the file does'nt exist then the script exits, but if their is a error in the scripting it displays an error and continues executing rest of the page.

This should'nt be a problem normally but I just wanted to know how I could secure this in the off chance it does happen.

Posted: Sat Aug 09, 2003 2:28 pm
by McGruff
Is there a particular block of code that is causing problems?

Posted: Sat Aug 09, 2003 3:02 pm
by CrazyJimmy
Basically I want to know if I can return a value from a require call to make sure it executed else I can trap and exit

Posted: Sat Aug 09, 2003 3:12 pm
by qartis
if (!@require($file)){
die("I had a problem including that file");
}