Is it possible to define a function for all pages without using include()
in all of them?
- Ex: I have a secret directory
../seg/staff/login/
and I want to define that user with permission level less than 3 can not access them.
Could create a seg.php
file:
if($nivel < 3){
echo ("Você não possui permissão para isto.");
}
And call it on others with include("seg.php")
.
Now let's say I have 70 pages. Is there any way I can set this in some .htacess
or other without having to put require("")
, include("")
, etc. in all files?