Jump to content

Legacy code base include issue


maxxd

Recommended Posts

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 by maxxd
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.