Esempio n. 1
0
 /**
  * 本体実行前にクラスを初期化する。
  */
 static function init()
 {
     //GET、POST、COOKIEの初期化
     self::$post = $_POST;
     self::$get = $_GET;
     self::$cookie = $_COOKIE;
     if (get_magic_quotes_gpc()) {
         self::$post = map('stripslashes', self::$post);
         self::$get = map('stripslashes', self::$get);
         self::$cookie = map('stripslashes', self::$cookie);
     }
     self::$get = map('rawurldecode', self::$get);
     if (ini_get('mbstring.encoding_translation')) {
         $encode = ini_get('mbstring.internal_encoding');
         $proc = "return mb_convert_encoding(\$str, 'UTF-8', '{$encode}');";
         self::$post = map(create_function('$str', $proc), self::$post);
     }
 }