How to set up only allow access to some of the dynamic scripts under the site, such as: a.php,b.php, although there are other dynamic scripting pages under the Site Directory
Reply content:
How to set up only allow access to some of the dynamic scripts under the site, such as: a.php,b.php, although there are other dynamic scripting pages under the Site Directory
This should not be handled on the IIS layer, it should involve the authority of the Code logically edit the question ~ ~ ~
Not how to use IIS, seemingly not for the file it? And even if it is too troublesome for the file, and then add and reduce files, do you always have to modify IIS settings? It is recommended to put the allowed access in the same directory, for example
/root
|--/source
|--/public
Only allow access to the files under public, do not let the access to the/source, for example
/public/index.php
require_once ('../source/functions.php');echo 'it is index.php';
PHP files that reference other PHP files are based on disk paths and are not restricted by Web Access.