警告:get_headers()此函数只能用于URL中的URL

时间:2013-04-28 19:40:58

标签: php localhost get-headers

我想检查是否存在外部网址,并且我尝试使用不同的功能。大多数函数使用get_headers()函数,这总是向我显示警告“警告:get_headers()[function.get-headers]:此函数只能用于/ myhosting / ...中的URL”。可能是什么原因导致这不起作用? Localhost,Mac with MAMP

1 个答案:

答案 0 :(得分:5)

检查php.ini文件中的以下设置。它应该是On。

allow_url_fopen =开; (php doc:allow_url_fopen

你可以看看这个question如何编辑你的php.ini