Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP:imagettftext到达空格时停止_Php_Glyph_Imagettftext - Fatal编程技术网

PHP:imagettftext到达空格时停止

PHP:imagettftext到达空格时停止,php,glyph,imagettftext,Php,Glyph,Imagettftext,试验 如果您注意到,第二个链接没有写“test”这个词。我今天刚决定开始学习动态图像写作,我真的不知道从哪里开始找出问题所在。这是我的密码: <?php header ("Content-type: image/png"); $font = 'micross.ttf'; $image = @imagecreatefrompng( 'test.png' ); $white = @imagecolorallocate( $image, 255, 255, 2

试验

如果您注意到,第二个链接没有写“test”这个词。我今天刚决定开始学习动态图像写作,我真的不知道从哪里开始找出问题所在。这是我的密码:

<?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警告:imagettftext()[]:在第12行的/var/www/vhosts/ttgdark.com/httpdocs/plugins/xboximg.PHP中呈现glyph时出现问题。也许它不喜欢你的字体或编码?尝试不同的字体,看看会发生什么