0
http://ttgdark.com/plugins/xboximg.php?gamertag=testing ...PHP:當達到空間
http://ttgdark.com/plugins/xboximg.php?gamertag=another測試
如果你注意imagettftext停止,第二個鏈接不會寫的字「測試」。我只是決定今天開始學習動態圖像寫作,而我真的不知道從哪裏開始弄清楚什麼是錯誤的。這裏是我的代碼:
<?php
header ("Content-type: image/png");
$font = 'micross.ttf';
$image = @imagecreatefrompng('test.png');
$white = @imagecolorallocate($image, 255, 255, 255);
$grey = @imagecolorallocate($image, 128, 128, 128);
$black = @imagecolorallocate($image, 0, 0, 0);
$text = $_GET['gamertag'];
//$text = urlencode($text); // Replaces spaces with plus signs
@imagettftext($image, 11, 0, 40, 50, $black, $font, $text);
@imagepng($image);
@imagedestroy($image);
?>
PHP Warning: imagettftext() [<a href='function.imagettftext'>function.imagettftext</a>]: Problem rendering glyph in /var/www/vhosts/ttgdark.com/httpdocs/plugins/xboximg.php on line 12