maxxd Posted June 25, 2020 Share Posted June 25, 2020 (edited) Hi y'all. I just inherited a legacy system that is in mid-rebuild but needs to be tended until it can be completely phased out and have run into an issue I can't remember how to deal with. The file system is as such: DocumentRoot/ m/ js/ css/ In the 'm' directory I have many files that use require_once as so: require_once "m/another_file.php"; The problem is that none of them have a $_SERVER['DOCUMENT_ROOT'] or even a __DIR__ to start the path, so I'm blowing up with errors. I know this code works as it's currently in production, but I can't remember for the life of me what php.ini or .htaccess setting needs to be set to make it viable. My coworker swears he didn't have to do any magic to make it work on his system. Anybody old enough to remember? Edited June 25, 2020 by maxxd Quote Link to comment https://forums.phpfreaks.com/topic/311003-legacy-code-base-include-issue/ Share on other sites More sharing options...
maxxd Posted June 25, 2020 Author Share Posted June 25, 2020 Apparently the php.ini included in the repo was incorrect and the include_path had to be updated. Quote Link to comment https://forums.phpfreaks.com/topic/311003-legacy-code-base-include-issue/#findComment-1579175 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.