Why DOCUMENT_ROOT is different than realpath('.') on remote server
问题 with echo realpath('.').'<br>'; echo dirname(__FILE__).'<br>'; echo realpath(dirname(__FILE__)).'<br>'; echo $_SERVER[PHP_SELF].'<br>'; echo getcwd(); I get always /services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public but in phpinfo DOCUMENT_ROOT is /services/webpages/l/i/mydomain.com/public because of that I'm having hard times with .htaccess in conjunction with Zend Framework. On my local I'm able to make it work. But on the provider host I could not grasp the magic yet