Php ini_set changes the php. ini configuration function

Source: Internet
Author: User

You can use ini_set to quickly modify php. ini configuration settings, no need to open php. ini is enough, especially when you do not modify php on the VM. the role of this function will be discovered when ini is authorized. Let's look at several instances.

/Php tutorial ini_set change php. ini configuration function


You can use ini_set to quickly modify php. ini configuration settings, no need to open php. ini is enough, especially when you do not modify php on the VM. the role of this function will be discovered when ini is authorized. Let's look at several instances.
*/
// Ini_set has the ability to change php. ini settings. This function receives two parameters: the name of the configuration variable to be adjusted and the new value of the variable.

// For example, add 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'
';
}
?>

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.