file_get_contents(): SSL operation failed with code 1
出现file_get_contents(): SSL operation failed with code 1的错误
方法需要添加参数,如下:
$stream_opts = [
"ssl" => [
"verify_peer"=>false,
"verify_peer_name"=>false,
]
];
$response = file_get_contents("https://www.example.com",
false, stream_context_create($stream_opts));
解決方法參考:
- file_get_contents(): SSL operation failed with code 1. And more
- ile_get_contents SSL operation failed with code 1 SSL3_GET_SERVER_CERTIFICATE certificate verify failed
file_get_contents(): SSL operation failed with code 1的更多相关文章
- 安装 composer SSL operation failed with code 1
gavin@webdev:~> curl -sS https://getcomposer.org/installer | php Downloading... Download failed: ...
- phpmailer发送邮件出现错误:stream_socket_enable_crypto(): SSL operation failed with code 1.
如果开了调试,调试进去会看到错误提示: smtp_code:"stream_socket_enable_crypto(): SSL operation failed with code 1. ...
- composer在update时提示file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO
在开发的时候,需要把依赖的服务更新到最新,然后 手动composer update一下,提示如下: failed) Update failed (The "e "https://a ...
- 使用PHPMailer 中的报错解决 "Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:"
PHPMailer项目地址:https://github.com/PHPMailer/PHPMailer 项目中用到PHPMailer,使用过程中报错:"Connection failed. ...
- composer 安装提示 PHP Warning: readfile(): SSL operation failed with code 1
这是php设置openssl 没有指定cacert.pem (证书) 第一步:下载 cacert.pem 文件下载地址 https://curl.haxx.se/docs/caextract.html ...
- PHP函数file_get_contents()使用 https 协议时报错:SSL operation failed
场景: file_get_contents() 函数是用于将文件的内容读入到一个字符串中,是读取文件内容常用的函数之一. 但是有时在服务器上使用file_get_contents() 函数请求http ...
- failed to open stream: operation failed
# composer require oygza/aliyun-php-sdk-afs You are running composer with xdebug enabled. This has a ...
- Error: ORA-16501: the Data Guard broker operation failed ORA-16625: cannot reach database
在备库上建配置文件 DGMGRL> create configuration 'sharkdbbork' as primary database is 'sharkdb' connect ide ...
- hive subprocess failed with code X 的错误码对应信息
PipeMapRed.waitOutputThreads(): subprocess failed with code X ,这里code X对应的信息如下:error code 1: Operati ...
随机推荐
- Hooks初探
一.创建自己的HOOkS,并进行封装 二.创建自己的HOOkS,并进行封装
- Java Socket NIO示例总结
Java NIO是非阻塞IO的实现,基于事件驱动,非常适用于服务器需要维持大量连接,但是数据交换量不大的情况,例如一些即时通信的服务等等,它主要有三个部分组成: Channels Buffers Se ...
- RK3288 android切换耳麦通道
通过耳机状态切换耳机mic与板子麦/work/rk3288/firefly-rk3288_android5.1_git_20180126/kernel/sound/soc/codecs/es8323. ...
- codeforces863F Almost Permutation 费用流
题目传送门 题意: 构造出一个数列,数字在$1~n$的范围内,要求$\sum_{i=1}^n count(i)^{2}$最小,$count(i)$的意思是数列中i出现的次数.并且数列要满足两种类型的 ...
- uva658 dijkstra+状态压缩
题目大意: 假定有n个潜在的bug和m个补丁,每个补丁用长为n的字符串表示.首先输入bug数目以及补丁数目.然后就是对m 个补丁的描述,共有m行.每行首先是一个整数,表明打该补丁所需要的时间.然后是两 ...
- 在IntelliJ IDEA中新建Maven项目
在IntelliJ IDEA中新建Maven项目,选择“File->New->Project”,创建一个简单项目,不选择模板,如下图所示: 2 选择“Maven”,不需要使用内置结构(模板 ...
- AcWing 101. 最高的牛 (差分) 打卡
有 NN 头牛站成一行,被编队为1.2.3…N,每头牛的身高都为整数. 当且仅当两头牛中间的牛身高都比它们矮时,两头牛方可看到对方. 现在,我们只知道其中最高的牛是第 PP 头,它的身高是 HH ,剩 ...
- idea 中使用dataBase插件
最近一段时间重新开始学习Java 使用IntelliJ 发现有个链接数据库插件挺好用的,并且反应速度还挺快的记录下. 点击步骤:View → Tool Windows → data 进行数据库链接 发 ...
- CentOS 7 挂载ntfs分区!
装好centos7发现可以看到分区,可是打不开,还是得用ntfs-3g 官网下好 http://www.tuxera.com/community/ntfs-3g-download/ 然后解压tar - ...
- (转)深刻理解Linux进程间通信(IPC)
转:http://www.ibm.com/developerworks/cn/linux/l-ipc/index.html 序 linux下的进程通信手段基本上是从Unix平台上的进程通信手段继承而来 ...