protected function execute(Input $input, Output $output) { $server = $this->init($input, $output); /** @var SystemConfigServices $services */ $services = app()->make(SystemConfigServices::class); $sslConfig = $services->getSslFilePath(); $confing['wss_open'] = $sslConfig['wssOpen'] ?? 0; $confing['wss_local_cert'] = $sslConfig['wssLocalCert'] ?? ''; $confing['wss_local_pk'] = $sslConfig['wssLocalpk'] ?? ''; // 证书最好是申请的证书 if ($confing['wss_open']) { $context = [ 'ssl' => [ // 请使用绝对路径//'local_cert' => realpath('public' . $confing['wss_local_cert']), // 我在Apache下面测试var_dump()结果为false'local_cert' => realpath(dirname(__FILE__) . '/../../public' . $confing['wss_local_cert']), // 也可以是crt文件 'local_pk' => realpath(dirname(__FILE__) . '/../../public' . $confing['wss_local_pk']), 'verify_peer' => false, ] ]; } else { $context = []; }
1879
{{like_count}}
{{collect_count}}
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}