XAMPP和file_get_contents("https:// ...")

2 php xampp

我试过在xampp上运行下一个代码:

$url2="https://....";
$content=file_get_contents($url2);
Run Code Online (Sandbox Code Playgroud)

这就是我得到的错误:

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
Run Code Online (Sandbox Code Playgroud)

为了能够获取https://包装器的URL内容,我该怎么办?

提前致谢

Raw*_*ode 11

在您的php.ini中搜索以下内容:

extension=php_openssl.dll

如果它在那里并进行评论,请取消注释.如果不存在,请添加:-)

  • 你需要重启Apache (2认同)