webman输入路径报错,新手,php8.1

啊七
windows 11
php 8.1
composer 2.2.6

新手,按教程

https://www.workerman.net/doc/webman/install.html

运行

http://127.0.0.1:8787      正确

但是 带路径就不对了

http://localhost:8787/index/index
http://localhost:8787/index/json

报错

TypeError: get_class_methods(): Argument #1 ($object_or_class) must be an object or a valid class name, bool given in C:\Users\zhous\Desktop\TP\webman\vendor\workerman\webman-framework\src\App.php:558
Stack trace:
#0 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\webman-framework\src\App.php(558): get_class_methods()
#1 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\webman-framework\src\App.php(445): Webman\App::getRealMethod()
#2 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\webman-framework\src\App.php(149): Webman\App::parseControllerAction()
#3 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\workerman\Connection\TcpConnection.php(638): Webman\App->onMessage()
#4 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\workerman\Events\Select.php(295): Workerman\Connection\TcpConnection->baseRead()
#5 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\workerman\Worker.php(2431): Workerman\Events\Select->loop()
#6 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\workerman\Worker.php(1430): Workerman\Worker->run()
#7 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\workerman\Worker.php(1373): Workerman\Worker::forkWorkersForWindows()
#8 C:\Users\zhous\Desktop\TP\webman\vendor\workerman\workerman\Worker.php(549): Workerman\Worker::forkWorkers()
#9 C:\Users\zhous\Desktop\TP\webman\start.php(90): Workerman\Worker::runAll()
#10 {main}
1762 1 0
1个回答

walkor 打赏

更新到 workerman/webman-framework v1.2.7 或后续更高版本
composer require workerman/webman-framework ^v1.2.7

  • 暂无评论
年代过于久远,无法发表回答
×
🔝