I have an issue with opening a php file in a side folder for a project. I'm using
include('$_SERVER[DOCUMENT_ROOT]/KungFu/php/hours.php')
The error message is:
"Warning: include(1): failed to open stream: No such file or directory in C:\xampp\htdocs\KungFu\index.php on line 48"
also tried every variation there can be - with/out $_SERVER[DOCUMENT_ROOT], it still is not working. The index.php is in the main folder, and in the same one in a subfolder I have the hours.php, but it is not opening it in an include statement. However it is opening it via an a tag <a> with /KungFu/php/hours.php, so I really dont udnerstand why.
include($_SERVER[DOCUMENT_ROOT].'/KungFu/php/hours.php');include (__DIR__.'/../KungFu/php/hours.php')(orinclude (__DIR__.'/KungFu/php/hours.php')if i have mistaken the folder structure)