예제 #1
0
 /**
  * Return the appropriate configuration parameter from php.ini file
  * 
  * @param string $paramName Parameter name
  * @param string $defaultValue Default value
  * @return string fetched or default value
  */
 public static function getSys($paramName, $defaultValue = '')
 {
     switch ($paramName) {
         case 'max_post':
             // get the minimal allowed filesize in bytes
             // from the various configuration options
             $value = min(rad_config::convertToBytes(ini_get('post_max_size')), rad_config::convertToBytes(ini_get('upload_max_filesize')));
             break;
         default:
             $value = ini_get($paramName);
             $value = $value === false ? $defaultValue : $value;
     }
     return (string) $value;
 }