I am working on a somewhat large web site, and I would like to keep my include files out of the web root for security's sake. I have all of my website code in a directory inside the web root, and the include directory one level above the web root.
So, if I'm at example.com/dir1/index.php and I would like to include a file from the include directory, I would use
Code: Select all
require_once('../../include/mysql/file.php');Code: Select all
require_once('mysql/file.php');Code: Select all
require_once('../../include/mysql/file.php);Code: Select all
require_once('mysql/file.php');Code: Select all
:../../IncludeI would greatly appreciate any help you could give. Thanks,
Zach