We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
大佬救救我!! 没有任何报错信息!!! Ubuntu 18.04 64位 PHP 7.2.34 hprose v2.0.40
<?php require __DIR__.'/../vendor/autoload.php'; use Hprose\Socket\Server; use EasyWeChat\Factory; use Dotenv\Dotenv; $env = Dotenv::createImmutable(dirname(__DIR__)); $env->load(); $officialAccount = null; function getOfficialAccount() { global $officialAccount; if (empty($officialAccount)) { $config = [ 'app_id' => $_ENV['appid'], 'secret' => $_ENV['secret'], 'response_type' => 'array', ]; $officialAccount = Factory::officialAccount($config); } return $officialAccount; } function getAccessToken() { try { $token = getOfficialAccount()->access_token->getToken(); return $token['access_token'] ?? null; } catch (\EasyWeChat\Kernel\Exceptions\HttpException $e) { } catch (\EasyWeChat\Kernel\Exceptions\InvalidArgumentException $e) { } catch (\EasyWeChat\Kernel\Exceptions\InvalidConfigException $e) { } catch (\EasyWeChat\Kernel\Exceptions\RuntimeException $e) { } catch (\Psr\SimpleCache\InvalidArgumentException $e) { } return null; } function run() { $functions = [ 'getAccessToken', ]; $host = $_ENV['host'] ?? '127.0.0.1'; $port = $_ENV['port'] ?? '5678'; $server = new Server("tcp://{$host}:{$port}"); try { foreach ($functions as $func) { $server->addFunction($func); } } catch (Exception $e) { } $server->start(); } run();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
本地Mac命令行启动正常,线上环境Ubuntu启动马上退出!!!
大佬救救我!!
没有任何报错信息!!!
Ubuntu 18.04 64位
PHP 7.2.34
hprose v2.0.40
TCP Server 代码如下(无关紧要)
The text was updated successfully, but these errors were encountered: