php PHP_SAPI

WBOY
Release: 2016-06-23 13:42:20
Original
1936 people have browsed it

php判断解析php服务是由那种服务器软件,是采用那种协议 直接输出即可

代码如下:

echo PHP_SAPI;

?>

我的测试环境是nginx+fastcgi 输出结果为:

cgi-fcgi

如果是apache 运行环境,输出结果为

apache2handler

如果是命令行的形式执行,结果为

cli

这就是PHP_SAPI

Related labels:
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