I would like to know if this it’s fine.
I need to block web access to file and make it only avaible from other php (ie: include)
if(strstr($_SERVER['PHP_SELF'], "filename.php")){
header('Location: http://www.website.net');
}
thanks in advance
The most common way is to define a constant in a parent script
and check in your script if it exists: