-
Notifications
You must be signed in to change notification settings - Fork 32
Description
[0] HttpException in App.php line 583
控制器不存在:app\api\controller\Robot
try {
$instance = Loader::controller(
$controller,
$config['url_controller_layer'],
$config['controller_suffix'],
$config['empty_controller']
);
} catch (ClassNotFoundException $e) {
throw new HttpException(404, 'controller not exists:' . $e->getClass());
}
// 获取当前操作名
$action = $actionName . $config['action_suffix'];
$vars = [];
if (is_callable([$instance, $action])) {
// 执行操作方法
$call = [$instance, $action];
Call Stack
in App.php line 583
at App::module(['api', 'robot', null], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '1', ...], true) in App.php line 456
at App::exec(['type' => 'module', 'module' => ['api', 'robot', null]], ['app_host' => '', 'app_debug' => '1', 'app_trace' => '1', ...]) in App.php line 139
at App::run() in start.php line 19
at require('/private/var/www/cha...') in index.php line 19
Environment Variables
GET Dataempty
POST Dataempty
Filesempty
Cookies
thinkphp_show_page_trace0|0
Sessionempty
Server/Request Data
HTTP_COOKIEthinkphp_show_page_trace=0|0
HTTP_ACCEPT_LANGUAGEzh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7
HTTP_ACCEPT_ENCODINGgzip, deflate
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7
HTTP_USER_AGENTMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS1
HTTP_DNT1
HTTP_CACHE_CONTROLmax-age=0
HTTP_CONNECTIONkeep-alive
HTTP_HOSTchat.com
REDIRECT_STATUS200
SERVER_NAMEchat.com
SERVER_PORT80
SERVER_ADDR127.0.0.1
REMOTE_PORT53511
REMOTE_ADDR127.0.0.1
SERVER_SOFTWAREnginx/1.27.1
GATEWAY_INTERFACECGI/1.1
REQUEST_SCHEMEhttp
SERVER_PROTOCOLHTTP/1.1
DOCUMENT_ROOT/var/www/chat/chat/public
DOCUMENT_URI/index.php
REQUEST_URI/
SCRIPT_NAME/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHODGET
QUERY_STRING
SCRIPT_FILENAME/private/var/www/chat/chat/public/index.php
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1726133404.8155
REQUEST_TIME1726133404
Environment Variablesempty
ThinkPHP Constants
APP_PATH/private/var/www/chat/chat/public/../application/
THINK_VERSION5.0.27
THINK_START_TIME1726133404.8157
THINK_START_MEM361616
EXT.php
DS/
THINK_PATH/private/var/www/chat/chat/thinkphp/
LIB_PATH/private/var/www/chat/chat/thinkphp/library/
CORE_PATH/private/var/www/chat/chat/thinkphp/library/think/
TRAIT_PATH/private/var/www/chat/chat/thinkphp/library/traits/
ROOT_PATH/private/var/www/chat/chat/
EXTEND_PATH/private/var/www/chat/chat/extend/
VENDOR_PATH/private/var/www/chat/chat/vendor/
RUNTIME_PATH/private/var/www/chat/chat/runtime/
LOG_PATH/private/var/www/chat/chat/runtime/log/
CACHE_PATH/private/var/www/chat/chat/runtime/cache/
TEMP_PATH/private/var/www/chat/chat/runtime/temp/
CONF_PATH/private/var/www/chat/chat/public/../application/
CONF_EXT.php
ENV_PREFIXPHP_
IS_CLIfalse
IS_WINfalse
FILTER_VALIDATE_BOOL258
HTMLPURIFIER_PREFIX/private/var/www/chat/chat/vendor/ezyang/htmlpurifier/library
ADDON_PATH/private/var/www/chat/chat/addons/
ThinkPHP V5.0.27 { 十年磨一剑-为API开发设计的高性能框架 }
0.008691sShowPageTrace
API
/ˌeɪ.piˈaɪ/
noun
abbreviation for application programming interface: a way of communicating with a particular computer program or internet service
应用程序编程接口(Application Programming Interface的缩写)
nginx配置
server {
listen 80;
server_name chat.com;
root /var/www/chat/chat/public;
index index.html index.htm index.php;
access_log /usr/local/var/log/nginx/chat.access.log main;
error_log /usr/local/var/log/nginx/chat.error.log;
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
路由配置(没改动)
Route::domain(Env::get('route.url', ''),'api/robot');
请问这个是什么原因呢