php ini_set changes php.ini configuration function_PHP tutorial

WBOY
Release: 2016-07-20 11:01:20
Original
1022 people have browsed it

You can use ini_set to quickly modify the php.ini configuration settings without opening php.ini. Especially when you are on a virtual host and you do not have permission to modify php.ini, you will find the role of this function. Here are a few examples. Bar. ​

/php tutorial ini_set changes the php.ini configuration function


You can use ini_set to quickly modify the php.ini configuration settings without opening php.ini. Especially when you are on a virtual host and you do not have permission to modify php.ini, you will find the role of this function. Here are a few examples. Bar.
*/
//ini_set has the function of changing php.ini settings. This function receives two parameters: the name of the configuration variable that needs to be adjusted, and the new value of the variable.

//For example, increase the maximum execution time when a script appears:

$old_max_execution_time = ini_set('max_execution_time', 120);
echo "old timeout is $old_max_execution_time
";

$max_execution_time = ini_get('max_execution_time');
echo "new timeout is $max_execution_time
";



echo 'function sets supported in this install are:
';
$extensions = get_loaded_extensions();
foreach ($extensions as $each_ext)
{
echo "$each_ext
";
echo '

    ';
    $ext_funcs = get_extension_funcs($each_ext);
    foreach($ext_funcs as $func)
    {
    echo "
  • $func
  • ";
    }
    echo '
';
}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445441.htmlTechArticleUse ini_set to quickly modify the php.ini configuration settings without opening php.ini, especially You will discover the role of this function when you do not have permission to modify php.ini during virtual hosting...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template