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

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

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -