Having trouble including some files

software development


I have .inc files I want to include from outside of the root directory. Is there a default folder that PHP points to, and/or is there a way for me to direct the include (basically) backward to the right file?


You can determine the current include path for your Dh php installation by inspecting the output of a phpinfo() program though, IIRC, you will not be able to “write” to those dirs ( you do not have sufficient privileges).

You can just include the full path to the file in the include call - either by using a “hardcoded” absolute path, or by using an environment variable.