php_network_getaddresses:getaddrinfo失败 [英] php_network_getaddresses: getaddrinfo failed

查看:86
本文介绍了php_network_getaddresses:getaddrinfo失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Image GD库的所有功能中都遇到此错误.

I am getting this error in all the functions of Image GD library.

$im = @imagecreatefromjpeg("src/bg.jpg") or die('Cannot Initialize new GD image stream');
function copyImage1($im, $dp1_name, $x1, $y1){
    $dp1 = imagecreatefromjpeg($dp1_name);
    list($w1, $h1) = getimagesize($dp1_name);
    imagecopy($im, $dp1, 35, 130, 0, 0, $w1, $h1);
}
function copyImage2($im, $dp2_name, $x2, $y2){
    $dp2 = imagecreatefromjpeg($dp2_name);
    list($w2, $h2) = getimagesize($dp2_name);
    imagecopy($im, $dp2, 618, 125, 0, 0, $w2, $h2);
}

$box = imagettfbbox(30, 0, "src/font.ttf", $user_name);
imagettftext($im, 23, 0, 53, 348, imagecolorallocate($im, 73, 184, 227), "src/font.ttf", "hello");
imagettftext($im, 23, 0, 628, 348, imagecolorallocate($im, 73, 184, 227), "src/font.ttf", "byr");
copyImage1($im, "http://graph.facebook.com/100001504336690/picture?width=153&height=143", 10, 10);
copyImage2($im, "http://graph.facebook.com/100001504336690/picture?width=138&height=158", 10, 10);

$file_name = "dump/" . rand(1000, 9999) . "-id-" . rand(1000, 9999) . ".jpg"; 
imagejpeg($im, $file_name, 80);
imagedestroy($im);


?>

文件在其位置可用,

代码运行正常,但现在无法正常工作.我不知道它现在不能正常工作.

Code was working fine but now it is not working. I don't know wyy it is not working now..

推荐答案

重新启动apache服务器也解决了我的问题.我最近搬到了专用服务器,因此出现了一些最初的DNS问题.

Restarting apache server also resolved my issue. I recently moved to a dedicated server so there were some initial DNS issues.

这篇关于php_network_getaddresses:getaddrinfo失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆