Enable proper relative path in cron
        Posted  
        
            by Webnet
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Webnet
        
        
        
        Published on 2010-05-18T13:35:20Z
        Indexed on 
            2010/05/18
            13:40 UTC
        
        
        Read the original article
        Hit count: 184
        
I have 2 servers that are on completely separate OS' and configurations.  One properly accepts require_once '../file.php'; and the other doesn't, because it's relative to where the cron is loading I guess.
How can I fix the 2nd location so that it's relative path is from the relative path of the file. I need this to work in 3 different environments (local, beta, and live) so I don't want to write a bunch of code on this page, I'd prefer a configuration adjustment if possible.
© Stack Overflow or respective owner