I have a php file outside my webroot in which I want to include a file that is inside the webroot.
folder outside webroot
- > php file in which I want to include
webroot
- > file to include
So I have to go one directory up, but this doesnt work:
include('../webroot/file-to-include.php');
Include full path doesn't work either:
include('home/xx/xx/domains/mydomain/webroot/file-to-include.php');
How can I accomplish this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…