Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master分支启动失败 #64

Open
limFun opened this issue May 17, 2023 · 1 comment
Open

master分支启动失败 #64

limFun opened this issue May 17, 2023 · 1 comment

Comments

@limFun
Copy link

limFun commented May 17, 2023

` php index.php start
PHP Warning: Class "Hyperf\Coroutine\Exception\ChannelClosedException" not found in /code/aa/vendor/hyperf/utils/src/Exception/ChannelClosedException.php on line 14

Warning: Class "Hyperf\Coroutine\Exception\ChannelClosedException" not found in /code/aa/vendor/hyperf/utils/src/Exception/ChannelClosedException.php on line 14
PHP Fatal error: Uncaught Error: Class "Hyperf\Coroutine\Exception\ChannelClosedException" not found in /code/aa/vendor/hyperf/utils/src/Exception/ChannelClosedException.php:20
Stack trace:
#0 /code/aa/vendor/composer/ClassLoader.php(478): include()
#1 /code/aa/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /code/aa/vendor/hyperf/utils/src/Functions.php(541): class_exists()
#4 /code/aa/vendor/composer/autoload_real.php(71): require('...')
#5 /code/aa/vendor/composer/autoload_real.php(61): composerRequire6a2e6872fe43e081e18b792802126581()
#6 /code/aa/vendor/autoload.php(7): ComposerAutoloaderInit6a2e6872fe43e081e18b792802126581::getLoader()
#7 /code/aa/index.php(4): require_once('...')
#8 {main}
thrown in /code/aa/vendor/hyperf/utils/src/Exception/ChannelClosedException.php on line 20

Fatal error: Uncaught Error: Class "Hyperf\Coroutine\Exception\ChannelClosedException" not found in /code/aa/vendor/hyperf/utils/src/Exception/ChannelClosedException.php:20
Stack trace:
#0 /code/aa/vendor/composer/ClassLoader.php(478): include()
#1 /code/aa/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /code/aa/vendor/hyperf/utils/src/Functions.php(541): class_exists()
#4 /code/aa/vendor/composer/autoload_real.php(71): require('...')
#5 /code/aa/vendor/composer/autoload_real.php(61): composerRequire6a2e6872fe43e081e18b792802126581()
#6 /code/aa/vendor/autoload.php(7): ComposerAutoloaderInit6a2e6872fe43e081e18b792802126581::getLoader()
#7 /code/aa/index.php(4): require_once('...')
#8 {main}
thrown in /code/aa/vendor/hyperf/utils/src/Exception/ChannelClosedException.php on line 20
`

@limFun
Copy link
Author

limFun commented May 17, 2023

`use Hyperf\Nano\Factory\AppFactory;

require_once DIR . '/vendor/autoload.php';

$app = AppFactory::create();

$app->get('/', function () {

$user = $this->request->input('user', 'nano');
$method = $this->request->getMethod();

return [
    'message' => "hello {$user}",
    'method' => $method,
];

});

$app->run();`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant