php 安装后配置 wampserver 以启用 ssl
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4774182/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
configuring wampserver after installation to enable ssl
提问by Day_Dreamer
I installed wampserver with Apache v2.2.17 and PHP v5.3.5.
When I use the function file_get_contents()
with the HTTPS URL as a parameter, I get the following warning:
我用 Apache v2.2.17 和 PHP v5.3.5 安装了 wampserver。当我使用file_get_contents()
HTTPS URL 作为参数的函数时,我收到以下警告:
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:\wamp\www\fbapp\index.php on line 22
警告:file_get_contents() [function.file-get-contents]:无法找到包装器“https”——您是否在配置 PHP 时忘记启用它?在 C:\wamp\www\fbapp\index.php 第 22 行
Is there a way to configure wampserver to enable SSL without reinstalling it?
有没有办法配置 wampserver 以启用 SSL 而无需重新安装它?
回答by Day_Dreamer
I looked it up and you should:
我查了一下,你应该:
- Check
ssl_module
in the Apache modules. - Check
php_openssl
in the PHP extensions.
- 签
ssl_module
入 Apache 模块。 - 检查
php_openssl
PHP 扩展。
Working! :)
在职的!:)
回答by Sarvar Nishonboev
And check one more thing:
再检查一件事:
It may give an error if the file is not found as well. So use this one:
如果文件也找不到,它可能会出错。所以使用这个:
$f=@file_get_contents(path);
if($f){
// your code here...
}