So i need to include a config File from 3 Directories above. File Structure: root/template/default/premium/myFile.php I am trying to include: root/include/config.php
My attempts:
if(include('../../../include/config.php') == true){
echo "Config loaded succesfully<br>";
}else{
echo "There was a Big Time Error loading the Config!<br>";
}
This one is not working, I keep getting the Big Time Error Message ;)
Next i tried with:
include($_SERVER['DOCUMENT_ROOT'] . '/include/config.php');
Also no Luck with this one if I try to access my defines it´s not working.
After Dormilich suggestion on checking the manual i found a Mistake and changed my Code as followed:
if((include'../../../include/config.php') == true){
echo "Config loaded succesfully<br>";
}else{
echo "There was a Big Time Error loading the Config!<br>";
}
Still not working