The “FX_SCRIPT_NAME” variable is being used to prevent direct calls to scripts that should not be accessed directly. I’ve got the following code:
index.php...
define('FX_SCRIPT_NAME', 'index');
require_once("./includes/core.php");
...
includes/core.phpif(!defined(FX_SCRIPT_NAME)) {
fx_die(1005, 'Script identifier missing or invalid.', 'script-name-not-found');
}
…and accessing index.php gives me the custom fx_die error message stating script-name-not-found. Does a define’d variable not get passed to required/included scripts? If not, is there another way to ensure secondary script files like includes/core.php can’t be called directly?