NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

michelefaccini's avatar
Dec 25, 2015

Apache - DOCUMENT_ROOT

Hi all,

Actually I'm hosting my website from a ReadyNas Ultra 2 Plus and I'm developping it on a WAMP server.

When I bought my ReadyNas I hadn't any knowledge of PHP programming.

Inevitably I have now to reprogram some ugly code.

On my php.ini WAMP server file the DOCUMENT_ROOT is set to the directory where I have my site ( in my case H:/wamp/www/ ) so I have no problem to reference any files to the root directory using : define('SITEPATH', $_SERVER['DOCUMENT_ROOT']);

 

Because on my ReadyNas the DOCUMENT_ROOT  is set to /frontview/ui/resource/html, i can't use the $_SERVER['DOCUMENT_ROOT']

 

Any suggestion that can avoid me to use relative path in my scripts ?

 

Thanks for your answer and time !!!!!!!

 

 

 

1 Reply

Replies have been turned off for this discussion
  • This work but I don't know if it's a good idea ? For security .....

    define('SITEPATH', $_SERVER['DOCUMENT_ROOT']."/../../../../mysite/");

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More