check if ssl is enabled with php

一个人想着一个人 提交于 2019-12-11 19:25:44

问题


I need to run a module that need ssl to be enabled. How can I detect if ssl has been enabled?

The module generate a form through a javascript call.

I am using php.

I have no access to ssl.

Thanks a lot!


回答1:


use the extension loaded check!

http://php.net/manual/en/function.extension-loaded.php

 if(!extension_loaded('openssl'))
    {
        throw new Exception('This app needs the Open SSL PHP extension.');
    }

try it ;)



来源:https://stackoverflow.com/questions/21848277/check-if-ssl-is-enabled-with-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!