Thursday, March 6, 2014

PHP include_once from parent folder not working in version 5 above

I don't know why but the include_once does not work if the file is one folder above the file calling it.  There is a fatal error logged in the error log file, but it does seem to be still working.

The solution, that I found here: http://stackoverflow.com/questions/5588639/php-include-once-not-working
seems to work, and does not register as error after I place the code sample:

include_once (dirname(__FILE__) . '/../file.php');

Thank you, to the person who shared the answer.