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 ...
随机推荐
- 理解 Activity.runOnUiThread
在开发 Android 应用的时候我们总是要记住应用主线程. 主线程非常繁忙,因为它要处理绘制UI,响应用户的交互,默认情况下执行我们写下的大部分代码. 好的开发者知道他/她需要将重负荷的任务移除到工 ...
- KiCAD原理图更换库
KiCAD原理图库更换 将AD的工程文件转换位KiCAD后,打开原理图,系统会自动压缩生成当前工程库,但是这样将原理图复制粘贴到其他地方时,就找不到库了,原理图就会无法显示器件符号,如何将库替换为我们 ...
- alter update
## sql alter update 添加.修改.删除字段 ## 添加列名alter table 表名 add 列名 列类型;alter table 表名 add 列名 列类型 not null d ...
- hbuilder 配置app为沉浸式状态栏
- hibernate3.6异常
WARN DTDEntityResolver:73 - recognized obsolete hibernate namespace http://hibernate.sourceforge.net ...
- leetcode-163周赛-1260-二维网格迁移
题目描述: 自己的提交: class Solution: def shiftGrid(self, grid: List[List[int]], k: int) -> List[List[int] ...
- Attribute 实现Aop
1.先定义一个 拦截属性 AopAttribute using System; using System.Collections.Generic; using System.Linq; using S ...
- python语法学习
global关键字(内部作用域想要对外部作用域的变量进行修改) decator装饰器,说白了就是一个函数指针的传递 *arg,**kwarg, 分别为tuple,dic传递
- shiro入门笔记之第一个demo创建
前言 看到这篇文章之前,可能很多小伙伴都没听过shiro,那么shiro是什么呢?shiro是Apache基金会下一个非常有名的开源项目(项目官网: http://shiro.apache.org/ ...
- 搭建hadoop集群 单机版
二.在Ubuntu下创建hadoop用户组和用户 这里考虑的是以后涉及到hadoop应用时,专门用该用户操作.用户组名和用户名都设为:hadoop.可以理解为该hadoop用户是属于一 ...