我刚刚安装了带有插件的wordpress,除了在“联系我”页面上可以看到这样的错误外,其他所有东西都可以找到。
警告:getimagesize():php\\u network\\u getaddresses:getaddrinfo失败:名称或服务在/var/www/foobar中未知。com/wp-content/themes/foobar/backend/theme-components/cs-header/cs\\u函数。php在线751
警告:getimagesize(http://dev.foobar/wp-content/uploads/2015/11/subheader-image-jobline-1.jpg): 未能打开流:php\\u network\\u getaddresses:getaddrinfo失败:名称或服务在/var/www/foobar中未知。com/wp-content/themes/foobar/backend/theme-components/cs-header/cs\\u函数。php在线751
cs_functions.php
第751行是:
if (is_file($cs_upload_dir . $cs_img_name) || is_file($cs_images_dir . $cs_img_name)) {
if (ini_get(\'allow_url_fopen\')) {
if ($header_banner_image <> \'\') {
$banner_image_height = getimagesize($header_banner_image);
}
}
} else if (isset($cs_upload_subdir_file) && is_file($cs_upload_dir . $cs_upload_subdir_file)) {
if (ini_get(\'allow_url_fopen\')) {
// THIS IS LINE 751
$banner_image_height = getimagesize($header_banner_image);
}
} else {
$banner_image_height = \'\';
}
所以,我去了
/etc/php.ini
并已检查
allow_url_fopen
并且设置为on
allow_url_fopen = On
发生了什么事?我该如何修复它