Переглянути джерело

Fixed: some includes error

Jinhui Zhu 4 роки тому
батько
коміт
da687ecb7b
3 змінених файлів з 5 додано та 5 видалено
  1. 2 2
      src/Qii.php
  2. 2 2
      src/Request/Http.php
  3. 1 1
      src/Request/Url.php

+ 2 - 2
src/Qii.php

@@ -33,7 +33,7 @@ require Qii_DIR . DS . 'Autoloader' . DS . 'Import.php';
 \Qii\Autoloader\Import::setFileLoaded(Qii_DIR . DS . 'Autoloader' . DS . 'Import.php');
 
 \Qii\Autoloader\Import::requires(
-    array(Qii_DIR . DS . 'Consts' . DS . 'Config.php',
+    array(Qii_DIR . DS . 'Config' . DS . 'Consts.php',
         Qii_DIR . DS . 'Functions' . DS . 'Funcs.php',
         Qii_DIR . DS . 'Autoloader' . DS . 'Factory.php',
         Qii_DIR . DS . 'Application.php',
@@ -212,4 +212,4 @@ $namespace = _include(Qii_DIR . DS . 'Conf' . DS . 'namespace.php');
 //捕获FATAL错误,用户可以选择记录到日志,还是直接显示或者不显示错误
 register_shutdown_function('catch_fatal_error');
 set_exception_handler(array('\Qii\Exceptions\Errors', 'getError'));
-set_error_handler(array('\Qii\Exceptions\Errors', 'getError'), E_USER_ERROR);
+set_error_handler(array('\Qii\Exceptions\Errors', 'getError'), E_USER_ERROR);

+ 2 - 2
src/Request/Http.php

@@ -1,7 +1,7 @@
 <?php
 namespace Qii\Request;
 
-use Qii\Base\Request;
+use \Qii\Base\Request;
 
 final class Http extends Request
 {
@@ -216,4 +216,4 @@ final class Http extends Request
 
     }
 
-}
+}

+ 1 - 1
src/Request/Url.php

@@ -18,7 +18,7 @@ class Url
         if (!in_array($rewriteRule, $allow)) {
             throw new \Qii\Exceptions\Unsupported("链接模式错误,链接格式只能为 '<u><font color=\"green\">" . join("', '", $allow) . "</font></u>',当前模式为 '<font color=\"red\">" . $rewriteRule . "</font>'", __LINE__);
         }
-        $className = 'Qii\Request\Url\\' . $rewriteRule;
+        $className = '\Qii\Request\Url\\' . $rewriteRule;
         $this->request = \Qii\Autoloader\Psr4::getInstance()->loadClass($className, $rewriteRule);
         return $this;
     }