* Fix router error of api.

This commit is contained in:
zhujinyong
2022-01-04 10:52:29 +08:00
parent 17384dcb06
commit 87817d186c
+1
View File
@@ -92,6 +92,7 @@ class api extends router
*/
$this->path = trim(substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], 'api.php') + 7), '/');
if(strpos($this->path, '?') > 0) $this->path = strstr($this->path, '?', true);
$subPos = $this->path ? strpos($this->path, '/') : false;
$this->version = $subPos !== false ? substr($this->path, 0, $subPos) : '';