Analyze how to obtain the current running environment through PHP functions to determine the execution logic (tips)_PHP tutorial

WBOY
Release: 2016-07-21 15:03:37
Original
980 people have browsed it

Generally, our running environment is apache, of course some people use IIS environment
If we want to know what our current running environment is, then we only need to use the function php_sapi_name() to test
Perform comparison and judgment processing
Function: php_sapi_name();
The output result under the apache environment is "apache2handler";
In cgi mode The output result is "cgi-fcgi"
If it is run in command line mode, the output result is: "cli"


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327843.htmlTechArticleGenerally, our operating environment is apache. Of course, some people use IIS environment. If we want to know What is the environment we are currently running in, then we only need to use the function...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!