一个php问题
<?php
if(isset{$_GET[‘message’]})
{
$font='times';
$size=12;
$im=imageGreateFromPNG('button.png');
$tsize=imagettfbbox($size,0,$font,$_GET['message']);
//居中
$dx=abs($tsize[2]-$tsize[0]);
$dy=abs($tsize[5]-$tsize[3]);
$x=(imagesx(sim)-$dx)/2;
$x=(imagesx(sim)-$dx)/2+$dy;
//绘制图像
$black=ImageColorAllocate($im,0,0,0);
ImageTTFText($im,$size,0,$x,$y,$black,$font,$_GET['message']);
ImageTTFText($im,$size,0,$x,$y,$black,$font,$_GET['message']);
//返回图像
header('content-type:image/png');
ImagePNG($im);
exit;
}
?>
<html>
<head><title>Button Form</title></head>
<body>
<form action="<?=$php_SELF?>"method="GET">
ENTER message to appear on button:
<input type="text" name="message"/><br/>
<input type="submit" value="Greate Button"/> </form>
</body>
</html>
代码如上。 我是照着书打得代码,总是出错 。。 这段代码意思是在表单中填写内容,在点击button之后,按钮上面的 内容会改变 成你填写的内容 。 他总是报错 第二行 我不懂了 。。谢谢
Parse error: parse error, expecting `'('' in E:\runphp\htdocs\php4book\webwindows.php on line 2