The ini_set function is introduced in the previous article. ini_get is the opposite of ini_set, which is used to retrieve php. the value of the environment variable in the INI file. syntax: the ini_set function is introduced in the previous article. ini_get is the opposite of ini_set, which is used to retrieve php. the value of the environment variable in the INI file.
Syntax:
String ini_get (string varname)
The return value is 0 or 1 if it is Boolean.
Reference content is as follows:
Echo 'display _ errors = '. ini_get ('display _ errors'). "\ n ";
Echo 'register _ globals = '. ini_get ('register _ globals'). "\ n ";
Echo 'post _ max_size = '. ini_get ('post _ max_size'). "\ n ";
Echo 'post _ max_size + 1 = '. (ini_get ('post _ max_size') + 1). "\ n ";
Echo 'post _ max_size in bytes = '. return_bytes (ini_get ('post _ max_size '));
?>
If you want to obtain the variable value in the entire php. ini file, use the ini_get enhancement function ini_get_all ()
The ini_get_all () function returns the entire php environment variable in the form of an array.
Easy to use
Reference content is as follows:
$ Ini = ini_get_all ();
Print_r ($ ini );
?>
Of course, it is more convenient to use phpinfo () for php configuration information.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.