在PHP中卷曲,SSLV3在bash中起作用,但在libcurl中不起作用 [英] Curl in PHP, SSLV3 works in bash but not in libcurl

查看:62
本文介绍了在PHP中卷曲,SSLV3在bash中起作用,但在libcurl中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此命令直接在bash中起作用:

This command works directly in bash:

curl --sslv3 -k 'https://www.test_site.com/test/abc.do'

如果没有--sslv3和-k,则无法在bash中使用

It does not work in bash without both --sslv3 and -k

我一直在尝试使用以下代码在PHP中进行复制,但是我没有任何反应.甚至没有错误.将不胜感激任何建议.

I've been trying to replicate in PHP with the following code but I get no response at all. Not even an error. Would appreciate any advice.

$curl = curl_init();

curl_setopt($curl, CURLOPT_URL,"https://www.test_site.com/test/abc.do");
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSLVERSION, 3);

$result = curl_exec ($curl);
curl_close ($curl);

print $result;

推荐答案

没关系.我是错别字.可以与ssl和其他命令一起正常工作.

nevermind. Typo on my part. Works fine with both the ssl and other command.

这篇关于在PHP中卷曲,SSLV3在bash中起作用,但在libcurl中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆