“include” and IIRC “require” are keywords that will always return a 403 in the browser, but will work correctly if included or required from another file, not in those directories .
See this:
The includes folder
For security reasons, all files in a folder includes
are blocked. This includes URLs like http://example.com/includes/function.php or http://example.com/includes/pages/product.php .
The idea behind this is that includes
means that the folder contains scripts meant to be loaded into other scripts with PHP include (or require ). Scripts like that are generally not meant to be accessed directly.
The fix for this is simple: do not use the folder name includes
for anything that’s supposed to be accessed by browser. Instead, put such pages in a folder pages
, functions
, actions
or a folder with any other name.
5 Likes