Preventing direct access to php files

前端 未结 3 2041
时光取名叫无心
时光取名叫无心 2020-12-07 05:39

Here is an example of my file structure.

/index.php
/inc
/inc/file1.php
/inc/file2.php
/inc/file3.php
/search.php

index.php includes() file

3条回答
  •  猫巷女王i
    2020-12-07 06:13

    Get them outside the document root:

    /documentroot/index.php
    /inc/file1.php
    /inc/file2.php
    /inc/file3.php
    

    So, there is no direct access to them whatsoever.

提交回复
热议问题