PHP选项与资讯函数库:php_sapi_name

php_sapi_">name

(PHP4 >= 4.0.1)

php_sapi_name ---  传回web伺服与PHP之间的介面型态

语法 : string php_sapi_name (void)

说明 :

php_sapi_name( )传回一个小写的字符串,说明web伺服器与PHP(Server API, SAPI)之间的介面型态。CGI PHP,此字符串将会是"cgi";Aapache的mod_php,此字符串将会是"apache"等等。

Example :

<?php

$inter_type = php_sapi_name();

if ($inter_type == "cgi")

print "You are using CGI PHP\n";

else

print "You are not using CGI PHP\n";

?>

时间: 2024-09-06 20:31:35

PHP选项与资讯函数库:php_sapi_name的相关文章

PHP选项与资讯函数库:assert_options

assert_options (PHP4 >= 4.0b4) assert_options ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 设定(取得)各式的assert旗标 语法 : mixed assert_options (int what [, mixed value]) 说明 : 使用assert_options( )你可以设定各式的assert( )控制选项,或只是查询它们目前的设定. a

PHP选项与资讯函数库:phpinfo

phpinfo (PHP3 , PHP4) phpinfo ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 输出PHP资讯 语法 : int phpinfo (void) 说明 : 输出全部关于目前PHP的状态的资讯,这包含了关于PHP编译选项.扩充模组.PHP版本.伺服器资讯和环境.PHP环境.作业平台资讯.路径.结构(configuration)选项的值.HTTP标头.GNU Public Licens

PHP选项与资讯函数库:get_cfg_var

get_cfg_var (PHP3 , PHP4) get_cfg_var ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 取得PHP结构选项的值 语法 : string get_cfg_var (string varname) 说明 : 传回PHP结构(configuration)变量varname目前的值,发生错误则传回false. 当PHP在编译(compiled)的时候,它将不会传回结构资讯,或从A

PHP选项与资讯函数库:get_required_files

get_required_files (PHP4 >= 4.0RC2) get_required_files ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 传回在程式中require_once( )文件的名称 语法 : array get_required_files (void) 说明 : 此函数传回使用require_once( )已经载入到程式的所有文件的名称,此函数将传回一组合数组,数组的索

PHP选项与资讯函数库:get_extension_funcs

get_extension_funcs (PHP4 >= 4.0b4) get_extension_funcs ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 传回模组的函数名称 语法 : array get_extension_funcs (string module_name) 说明 : 此函数传回模组(module)module_name中定义的所有函数的名称. Example : <?p

PHP选项与资讯函数库:set_time_limit

set_time_limit (PH3 , PHP4) set_time_limit ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 限制最大的执行时间 语法 : void set_time_limit (int seconds) 说明 : 设定一个程式所允许执行的秒数,如果到达限制的时间,程式将会传回错误.它预设的限制时间是30秒,max_execution_time的值定义在结构文件中(在PHP3中叫做

PHP选项与资讯函数库:get_loaded_extensions

get_loaded_extensions (PHP4 >= 4.0b4) get_loaded_extensions ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 传回所有编译模组和载入的名称 语法 : array get_loaded_extensions (void) 说明 : 此函数传回所有编译模组(module)的名称,并且载入PHP解译者(interpreter)之中. Example

PHP选项与资讯函数库:extension_loaded

extension_loaded (PHP3 >= 3.0.10 , PHP4 >= 4.0b4) extension_loaded ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 判断扩充模组是否已载入 语法 : bool extension_loaded (string name) 说明 : 如果参数name指定的扩充模组已载入则此函数传回true,你可以使用phpinfo( )来看见各种扩

PHP选项与资讯函数库:get_included_files

get_included_files (PHP4 >= 4.0RC1) get_included_files ---&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp; 传回在程式中include_once( )文件的名称 语法 : array get_included_files (void) 说明 : 此函数传回使用include_once( )已经载入到程式的所有文件的名称,此函数将传回一组合数组,数组的索