2013-07-13 83 views
0

我正在嘗試在外部服務器上打開一個WordPress站點,但是我沒有使用其IP地址和Mac上的調整HOST文件來檢查服務器上的域。當我訪問該網站我得到這樣的錯誤:WordPress網站錯誤未能打開流:HTTP請求失敗! HTTP/1.1 404 Not Found

Warning: file_get_contents(http://domain/folder/wp-content/themes/theme-name/img/phonehead.svg) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme-name/inc/control/file.php on line 16 

我發現在同一個問題的一些文章像this之一。問題不在於路徑錯誤或文件不存在。它似乎與我的路由器或我使用主機文件解析域到新的IP地址的方式有關。

我添加的hosts文件行應該沒問題,所以也許我的D-Link DVG-N5412SP路由器在處理請求時出現問題。但我沒有找到我如何解決這個問題。我需要調整什麼?

更新

從其他位置我

Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme/inc/control/THeaderControl.php on line 16 

這可能指向我正確的方向。在它上面工作。

回答

0

爲了使本地路徑請求不通過網絡,我不得不使用WordPress模板標籤get_template_directory()而不是get_bloginfo('stylesheet_directory')

相關問題