php - website hostname and docroot -


is there way in php hostname , document root server? i'd without storing them variables in php code. reluctant use $_server because have heard not reliable , subject attack. how can done on virtual host? reliable , safe method exist?

$_server['document_root'] reliable $_server['server_name'] isn’t (see chris shiflett’s server_name versus http_host). if apache’s usecanonicalname enabled canonical name shown.


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -