取得 php教程 的配置选项值。
语法: string get_cfg_var(string varname);
返回值: 字符串
函数种类: php 系统功能
内容说明
若正确取得目前 php 配置选项 varname,则返回变量值。失败则返回 false。
立即学习“PHP免费学习笔记(深入)”;
*/
echo "php设置的最大执行时间为:n";
print_r(get_cfg_var("max_execution_time")); //获得配置项的值
echo "
n";
echo "php设置的每个脚本的可使用内存总量为:n";
print_r(get_cfg_var("memory_limit")); //获得配置项的值
echo "
n";
echo "php设置的接受post的最大大小为:n";
print_r(get_cfg_var("post_max_size")); //获得配置项的值
echo "
n";
echo "php设置smtp服务器名为:n";
print_r(get_cfg_var("smtp")); //获得配置项的值
echo "
n";
echo "php设置的上传文件的最大大小为:n";
print_r(get_cfg_var("upload_max_filesize")); //获得配置项的值
echo "
n";
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号