服务启动错误
来源:7-5 让Swoole完美支持TP5(下)
qq_PPD_阳阳_04417543
2018-04-30
Fatal error: Uncaught Error: Class 'think\Error' not found in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php:20
Stack trace:
#0 /www/wwwroot/swoole.cyqit.com/server/Swoole_Http_server.php(17): require_once()
#1 {main}
thrown in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php on line 20
[2018-04-30 19:18:06 *7896.0] ERROR zm_deactivate_swoole (ERROR 503): Fatal error: Uncaught Error: Class 'think\Error' not found in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php:20
Stack trace:
#0 /www/wwwroot/swoole.cyqit.com/server/Swoole_Http_server.php(17): require_once()
#1 {main}
thrown in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php on line 20.
[2018-04-30 19:18:06 $7135.0] WARNING swManager_check_exit_status: worker#0 abnormal exit, status=255, signal=0
PHP Fatal error: Uncaught Error: Class 'think\Error' not found in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php:20
Stack trace:
#0 /www/wwwroot/swoole.cyqit.com/server/Swoole_Http_server.php(17): require_once()
#1 {main}
thrown in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php on line 20
Fatal error: Uncaught Error: Class 'think\Error' not found in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php:20
Stack trace:
#0 /www/wwwroot/swoole.cyqit.com/server/Swoole_Http_server.php(17): require_once()
#1 {main}
thrown in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php on line 20
[2018-04-30 19:18:06 *7897.0] ERROR zm_deactivate_swoole (ERROR 503): Fatal error: Uncaught Error: Class 'think\Error' not found in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php:20
Stack trace:
#0 /www/wwwroot/swoole.cyqit.com/server/Swoole_Http_server.php(17): require_once()
#1 {main}
thrown in /www/wwwroot/swoole.cyqit.com/thinkphp/base.php on line 20.
[2018-04-30 19:18:06 $7135.0] WARNING swManager_check_exit_status: worker#0 abnormal exit, status=255, signal=0
1回答
-
把base换成start
http服务器的workstart
define('APP_PATH', __DIR__ . '/../application/');
require __DIR__ . '/../thinkphp/start.php';base.php还没有加载think/error所有找不到,
使用start.php里面运行了think\Container::get('app', [APP_PATH])
->run()
->send()所以加载了框架里面用到的类,所以写start.php
写了start.php会开启服务器的时候没有指定控制器所以自动运行index模块index控制器index方法,
如果不想要输出,老师的方法是直接废掉这个方法,不用这个方法,直接在index方法中return,
112018-05-02
相似问题