dongxia1390 2014-11-21 07:03
浏览 60
已采纳

我需要在php标头中进行特殊设置才能生成SSL加密的xml输出吗?

I have a php script that uses the php header() function to prepare a header and then outputs an XML file that can be downloaded and saved.

Since there is sensitive information in the XML documents content I want to have it encrypted using SSL.

Is it sufficient to call that script with https or do I need to add special info in the header using the php header() function?

  • 写回答

1条回答 默认 最新

  • douchuitang0331 2014-11-21 07:07
    关注

    There's nothing you need to set in the header. If the connection was established via SSL, the response will be secure too.

    The minutiae of negotiating an SSL connection are handled by the hosting web server (e.g. Apache). The only thing you may want to do in PHP is check whether the current connection is using SSL or not by checking $_SERVER['HTTPS'].

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部