1
我想測試,如果之前我處理我的代碼存在遠程圖像..如何檢查遠程服務器映像是否存在?
我發現這個職位
How can one check to see if a remote file exists using PHP?
我試圖getimagesize
功能和file_get_contents
功能,但我得到了
Warning: getimagesize() [function.getimagesize]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /project/testImages.php on line 147
我無法在我的情況下修改服務器配置。
我不確定如何解決錯誤或者是否有其他解決方法。
感謝您的任何幫助。
[查看此答案](http://stackoverflow.com/a/982045/1729885)。 – 2013-05-06 23:47:21
爲什麼你需要知道這個圖像是否存在?因爲你的服務器可能拒絕外部訪問。 – 2013-05-06 23:59:08