php ini_set changes the php.ini configuration feature

Source: Internet
Author: User
Keywords Network programming PHP tutorial
Tags change configuration echo example examples find function host

/ php tutorial ini_set change php.ini configuration features


Use ini_set can quickly modify the php.ini configuration settings Oh, you do not need to open php.ini, especially when you do not have to modify php.ini permissions on the virtual host will find the function of this function, the following few examples It
* /
// ini_set has the ability to change php.ini settings. This function takes two arguments: 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 <br />";

$ max_execution_time = ini_get ('max_execution_time');
echo "new timeout is $ max_execution_time <br />";



echo 'function sets supported in this install are: <br />';
$ extensions = get_loaded_extensions ();
foreach ($ extensions as $ each_ext)
{
echo "$ each_ext <br />";
echo '<ul>';
$ ext_funcs = get_extension_funcs ($ each_ext);
foreach ($ ext_funcs as $ func)
{
echo "<li> $ func </ li>";
}
echo '</ ul>';
}
?>

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.