1
我试图用多个变量在PHP中生成的图像内的字符串,但我不断收到以下错误:显示多个变量
Parse error: syntax error, unexpected '' - '' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\Projects\scrobbl.in\image.php on line 36
我在做什么错?
这里是我的代码:
<?php
$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);
imagefill($img_number,0,0,$backcolor);
Imagestring($img_number,10,5,5,$currenttrack' - '$artist,$textcolor);
header("Content-type: image/jpeg");
imagejpeg($img_number);
?>
尝试' “$ currenttrack”。 “ - ”。 “$艺术家”' – Rizier123 2014-11-08 20:37:09
现在为什么在我试过的时候,地狱里没有那样的工作。它。谢谢。 :) – Cody 2014-11-08 20:37:48
欢迎您:D祝您有个美好的一天! (顺便说一句回答) – Rizier123 2014-11-08 20:38:59