Home  >  Article  >  Backend Development  >  php get_cfg_var gets PHP configuration_PHP tutorial

php get_cfg_var gets PHP configuration_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 16:59:00993browse

Get the configuration option value of php tutorial.

Syntax: string get_cfg_var(string varname);

Return value: String

Function type: php system function
Content Description

If the current php configuration option varname is obtained correctly, the variable value will be returned. Returns false on failure.

*/
echo "The maximum execution time set by php is: n";
print_r(get_cfg_var("max_execution_time")); //Get the value of the configuration item
echo "
n";
echo "The total available memory for each script set by php is: n";
print_r(get_cfg_var("memory_limit")); //Get the value of the configuration item
echo "
n";
echo "The maximum size of accepted posts set by php is: n";
print_r(get_cfg_var("post_max_size")); //Get the value of the configuration item
echo "
n";
echo "php sets the smtp server name: n";
print_r(get_cfg_var("smtp")); //Get the value of the configuration item
echo "
n";
echo "The maximum size of uploaded files set by php is: n";
print_r(get_cfg_var("upload_max_filesize")); //Get the value of the configuration item
echo "
n";

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631350.htmlTechArticleGet the configuration option value of the php tutorial. Syntax: string get_cfg_var(string varname); Return value: string Function type: php system function Content description If the current php configuration selection is correctly obtained...
Statement:
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