Check if PHP is installed on Apache or IIS Server?

后端 未结 5 1917
心在旅途
心在旅途 2020-12-10 02:35

Is there a way to check if PHP is installed on an Apache or IIS server within the PHP environment itself?

If so, how?

5条回答
  •  再見小時候
    2020-12-10 03:10

    You can also find out via the $_SERVER['DOCUMENT_ROOT'], sort of:

    Read http://www.helicron.net/php/

    (Basically, according to the article, Apache sets the document root with a valid variable, and IIS does not).

提交回复
热议问题