简体   繁体   English

IBM bluemix Cloud Foundry php缺少https支持吗?

[英]IBM bluemix Cloud Foundry php lack https support?

When using below function on cf, if the $url starts with "https:", the method always returns false: 在cf上使用以下函数时,如果$ url以“ https:”开头,则该方法始终返回false:

file_get_contents($url);

If I change the $url from "https" to "http", then it works. 如果我将$ url从“ https”更改为“ http”,则可以使用。 Is this the problem of CF or is there anyway I can use "https" to grab content from other site? 这是CF的问题,还是我可以使用“ https”从其他站点获取内容?

要从协议https获取内容,您需要从php.ini文件中启用openssl扩展。是否检查是否已启用。

You have to enable openssl support adding related extension in .bp-config/options.json For example 您必须启用openssl支持,然后在.bp-config / options.json中添加相关扩展名。

{
   "PHP_EXTENSIONS": [" openssl"]
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM