日期:2014-05-17  浏览次数:20459 次

ini_set更改php.ini配置功能
利用ini_set可以快速的修改php.ini配置设置哦,无需打开php.ini就可以了,特别是虚拟主机时你没有修改php.ini的权限时就会发现这个函数的作用了,下面看几个实例吧。
*/
//ini_set具有更改php.ini设置的功能。此函数接收两个参数:需要调整的配置变量名,以及变量的新值。

//例如,在某脚本出现时增加最大执行时间(maximum execution time):

$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>';
  }
?>

更多详细内容请查看:http://www.111cn.net/phper/php-function/34292.htm