define("SECURE", TRUE);
if (!defined("SECURE")) {
die ("You cannot directly access this file");
}
Jaffa_Cake said:When i do this I use a constant.
File:
Code:define("SECURE", TRUE);
Protected File:
Code:if (!defined("SECURE")) { die ("You cannot directly access this file"); }
marc2003 said:have your includes directory outside of the document root then it can never be run.![]()
Conrad11 said:Surely doing this means I wouldn't be able to run it even if it was included?
Jaffa_Cake said:You declare the constant in your index file then when it includes the other file then the constant is defined in your scripts. Which means that if you put that If statement on your first line then the file can't be executed past that line unless the constant is defined from your index.
Conrad11 said:Ah I see now....clever.
And I take it that there is no way to get past this?