基于PHP选项与信息函数的使用详解(2)


phpcredits(CREDITS_GROUP | CREDITS_DOCS | CREDITS_FULLPAGE);


bool phpinfo ([ int $what = INFO_ALL ] ) — 输出关于 PHP 配置的信息
string phpversion ([ string $extension ] ) — 获取当前的PHP版本
bool putenv ( string $setting )— 设置环境变量的值
void restore_include_path ( void ) — 还原 include_path 配置选项的值
string set_include_path ( string $new_include_path ) — 设置 include_path 配置选项
void set_time_limit ( int $seconds )— 设置脚本最大执行时间,从它本身开始计时,0表示不限时
string sys_get_temp_dir ( void ) — 返回用于临时文件的目录
mixed version_compare ( string $version1 , string $version2 [, string $operator ] ) — 对比两个PHP 规范化的版本数字字串

复制代码 代码如下:


if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
    echo '我的PHP版本很高: ' . PHP_VERSION . "\n";
}


int zend_thread_id ( void ) — 返回当前线程的唯一识别符
string zend_version ( void ) — 获取当前 Zend 引擎的版本

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/23eea31c4c5e0a5463eaee82b2e42c9d.html