0

这是我的连接字符串

$per_file_path = file_upload_absolute_path()."calert.pem"; 
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', $per_file_path);
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);      
// Open a connection to the APNS server live
$fp = stream_socket_client(
'ssl://gateway.push.apple.com:2195', $err,
$errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
if (!$fp)
exit("Failed to connect: $err $errstr" . PHP_EOL);
echo 'Connected to APNS' . PHP_EOL;

但无法连接。请建议

4

0 回答 0