【发布时间】:2013-07-31 10:07:18
【问题描述】:
萨拉姆每个人
我在 fatcow 中托管这个脚本,但它给了我一个“内部服务器错误”。
这是脚本:
<?php
create_image();
exit();
function create_image()
{
// Set the content-type
// Create the image
$im = imagecreatefrompng('coupon.png');
// Create red color
$red = imagecolorallocate($im, 120, 20, 20);
//get font arail
$font = 'font/arial.ttf';
// Insert variables into coupon
imagettftext($im, 36, 0, 176, 695, $red, $font, $_POST['Tdesc']);
imagettftext($im, 36, 0, 176, 985, $red, $font, $_POST['Tclient']);
imagettftext($im, 40, 0, 176, 1145, $red, $font, $_POST['Texpire']);
imagettftext($im, 42, 0, 176, 1355, $red, $font, $_POST['Toffre']);
imagettftext($im, 55, 0, 1796, 422, $red, $font, $_POST['Tcommande']);
imagettftext($im, 36, 0, 1488, 1000, $red, $font, $_POST['Tadresse']);
imagettftext($im, 36, 0, 1488, 1290, $red, $font, 'Tél. '. $_POST['Ttel']);
imagettftext($im, 60, 0, 1488, 1590, $red, $font, $_POST['Tvaleur']);
imagettftext($im, 60, 0, 1488, 1840, $red, $font, $_POST['Tcode']);
// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
}
?>
还有错误信息:
内部服务器错误
服务器遇到内部错误或配置错误,并且 无法完成您的请求。
请联系服务器管理员,并告知时间 发生了错误,以及您可能做过的任何事情 导致错误。
有关此错误的更多信息可能在服务器错误中可用 记录。
【问题讨论】:
-
您的 php 日志在这里会有所帮助。
-
还要检查服务器日志(即Apache等)。
-
你尝试过先声明函数然后调用它吗?
标签: php