BloggerAds

2011年5月14日 星期六

PHP fopen、file_get_contents使用注意事項

當使用PHP中的fopen、file_get_contents..等函數等,Server端一定要可以連到該URL的網頁,語法如下:
file_get_contents([URL])

若出現下列錯誤訊息:
Message: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

表示Server的IP變更過,而Apache沒有重新啟動過,這時只要將 Apache重新啟動即可解決這個錯誤。

沒有留言:

張貼留言