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 ...
随机推荐
- 2018-2-13-win10-uwp-改变鼠标
title author date CreateTime categories win10 uwp 改变鼠标 lindexi 2018-2-13 17:23:3 +0800 2018-2-13 17: ...
- teb教程8
融合动态障碍物 简介:考虑怎样把其他节点发布的动态障碍物考虑进来 1.本部分演示了动态障碍物该如何被包含到teb_local_planner中. 2.写一个简单的动态障碍物的发布器publish_dy ...
- mysql binlog相关
1.清除的binlog 删除所有binlog日志,新日志编号从头开始 RESET MASTER; 删除mysql-bin.XXXX之前所有日志 PURGE MASTER LOGS TO 'my ...
- dubbo-源码阅读之容器启动
dubbo Main 例子 public class Start { public static void main(String[] args) throws Exception { com.ali ...
- STL_map
map<string,int> m; int main() { m[; cout<<m["]<<endl; ; }
- 【LeetCode】BFS || DFS [2017.04.10--2017.04.17]
[102] Binary Tree Level Order Traversal [Medium-Easy] [107] Binary Tree Level Order Traversal II [Me ...
- PHP-组合总和
给定一个无重复元素的数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合. candidates 中的数字可以无限制重复被选 ...
- Jmeter关联之正则表达式提取器(完整版)
Jmeter关联之正则表达式提取器(完整版) 在性能测试中,若想提取上一个请求的结果,作为下一次请求的参数,则需要使用关联~ 这篇博客主要讲jmeter正则表达式提取器的各种用法. 首先正则表达式 ...
- JQuery 浮动DIV显示提示信息并自动隐藏
/** * 浮动DIV定时显示提示信息,如操作成功, 失败等 * @param string tips (提示的内容) * @param int height 显示的信息距离浏览器顶部的高度 * @p ...
- 最长上升子序列(LIS)问题
最长上升子序列(LIS)问题 此处我们只讨论严格单调递增的子序列求法. 前面O(n2)的算法我们省略掉,直接进入O(nlgn)算法. 方法一:dp + 树状数组 定义dp[i]:末尾数字是i时最长上升 ...