PHP - get project directory path on MacOsX apache -
i'm getting different results while retrieving root directory path of project folder under different environments: phpstorm8 browser debugger , mac osx apache2
php version: 5.6.6
apache: server version: apache/2.2.26 (unix)
my mac osx apache directory
/library/webserver/documents/projectfolder
i'm using phpstorm8 , workspace directory
/users/myname/documents/workspace/php/projectfolder
my folder structure this:
-projectfolder/ -config/ config.php - subfolder index.php index.php
below snippet on how getting root directory of project
echo "document_root:" . $_server['document_root'];
under phpstorm8 debugging environment, i'm getting:
document_root:/users/myname/documents/workspace/php/projectfolder
in mac osx apache, i'm getting:
document_root:/library/webserver/documents
why in mac osx apache, i'm not able root directory of project folder?
in mac osx apache:
in phpstorm8 in built apache
as can see in second pic, able project root folder 'moviex'. remember last time able same result in wamp, mamp, or centos. there special setting in mac osx apache that's preventing me doing so?
Comments
Post a Comment