2013-07-13 77 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')

相关问题