예제 #1
0
 /**
  * set a php configuration limit with a minimal value
  * if the value is < actual, the old value is used
  *
  * @param string     $config the php parameter
  * @param string|int $limit  the limit required
  *
  * @return string
  */
 static function setMaxPhpConfig($config, $limit)
 {
     $actual = CMbString::fromDecaBinary(ini_get($config));
     $new = CMbString::fromDecaBinary($limit);
     //new value is superior => change the config
     if ($new > $actual) {
         return ini_set($config, $limit);
     }
     return ini_get($config);
 }