Exemplo n.º 1
0
 /**
  * 获取URI-STRING
  */
 public static function get_uri_string()
 {
     $path = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');
     if (trim($path, '/') != '' && $path != "/" . SELF) {
         self::$uri_string = $path;
         return;
     }
     $path = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
     if (trim($path, '/') != '') {
         self::$uri_string = $path;
         return;
     }
     $path = isset($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');
     if (trim($path, '/') != '' && $path != "/" . SELF) {
         self::$uri_string = str_replace($_SERVER['SCRIPT_NAME'], '', $path);
         return;
     }
     self::$uri_string = '';
 }