【发布时间】:2014-11-16 05:30:55
【问题描述】:
在安全性方面哪个更合适?
如果是file_get_contents(),如果发生任何错误,它会在错误消息中显示被调用的url,这可能是易受攻击的。
【问题讨论】:
-
>>显示错误消息中调用的 url
-
两者都是安全的,但
curl会为您提供file_get_contents()无法提供的选项 -
是的,@jogesh_pi curl 为您提供了更多选择,但您真的应该告诉我们您想要做什么。
-
是的,我错过了可以关闭错误报告的部分。关闭它后,我可以使用 file_get_contents() 或 curl。谢谢。
标签: php security curl file-get-contents