我已经尝试在xampp上运行下一段代码:
$url2="https://....";
$content=file_get_contents($url2);这就是我得到的错误:
Warning: file_get_contents() [function.file-get-contents]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\whoTalk\sys\user.php on line 38我要怎么做才能得到一个https://包装器的url的内容?
提前感谢
发布于 2012-07-12 22:03:29
在您的php.ini中搜索以下内容:
extension=php_openssl.dll
如果它在那里并已注释,请取消注释。如果它不在那里,添加它:-)
发布于 2014-03-17 22:39:20
在WAMP中我添加了
allow_url_include = On
extension=php_openssl.dll
extension=php_curl.dll到我能找到的所有3个php.ini文件,即
\wamp\bin\php\php5.4.12\php.ini
\wamp\bin\php\php5.4.12\phpForApache.ini
\wamp\bin\apache\Apache2.4.4\bin\php.ini我不知道在哪个.ini文件中实际需要哪些具体设置,但https现在被接受了……
发布于 2012-07-12 22:03:14
您需要在XAMPP中启用OpenSSL扩展才能从安全的服务器获取任何内容。
https://stackoverflow.com/questions/11453487
复制相似问题