PHP签名脚本

PHP签名脚本,php,signature,imagettftext,Php,Signature,Imagettftext,代码中有错误,但我找不到,但当我打开页面时,页面是空的。我的VPS上signature.php的链接 <?php ob_start(); require_once 'dbconnect.php'; $name = $_GET['nick']; // This gets the player his name from the previous page. /* To protect MySQL injection. */ $name = stripslashes($name);

代码中有错误,但我找不到,但当我打开页面时,页面是空的。我的VPS上signature.php的链接

 <?php
 ob_start();
 require_once 'dbconnect.php';

$name = $_GET['nick']; // This gets the player his name from the previous page.

/* To protect MySQL injection. */
$name = stripslashes($name);
$name = mysqli_real_escape_string($name);

$res=mysqli_query($conn,"SELECT * FROM accounts WHERE Name='$name'"; // Gets all the information about the player.
$korisnik=mysqli_fetch_array($res);

if(mysqli_num_rows($res) != 0)
{

    $nick = $korisnik['Name'];
    $novacukupno = $korisnik['NovacDzep'];
    $lvl = $korisnik['Level'];


    // Creating of the .png image.
    header('Content-Type: image/png;');
    $im = @imagecreatefrompng('images/signature.png');
    $text_color = imagecolorallocate($im, 197,197,199); // RED, GREEN, BLUE --> Go to www.colorpicker.com, select a nice color. Copy the R/G/B letters provided by colorpicker and put them here.
    $ime = "$nick"; // This gets the information about player name to be showed in the picture.
    $level = "$lvl"; // Same as above ^^
    $novac = "$novacukupno"; // Same as above ^^
    $font = 'fonts/fontawesome-webfont.ttf'; //Upload your custum font to the directory where this file is placed. Then change the name here.
    /* USAGE OF THE imagettftext: First ($im) shouldn't be changed. (16) is the text-size. (0) is the angle of your text. Change it, and you'll see what's going on. (20) is de X-coordinate of the text.
    (36) is the Y-coordinate of the text. */
    imagettftext($im, 16, 0, 20, 36, $text_color, $font, $ime); // Prints the username in the picture. 
    imagettftext($im, 16, 0, 72, 69, $text_color, $font, $level); // Prints the score in the picture.
    imagettftext($im, 16, 0, 72, 99, $text_color, $font, $novac); // Prints the money in the picture.
    imagepng($im);
    imagedestroy($im);
} 
//else echo('Nema igraca pod tim nickom.'); // If the username doesn't exist (so the row is 0) then it'll give en error.

mysqli_close($conn);

?>
<?php ob_end_flush(); ?> 

尝试查找一些日志或打开错误:php.ini:display\u errors=on或ini\u set('display\u errors',1);ini设置(“显示启动错误”,1);错误报告(E_全部);谢谢你,我会试试的,但我不知道为什么这样不行。。