0
我們可以使用文本參數調用imagestring中的函數嗎?函數不能用於創建圖像
imagestring($im, 5, 5, 5, **$graph->createGraph()**, $text_color)
OR
另一種方式來創建函數輸出作爲數據的圖像?
我們可以使用文本參數調用imagestring中的函數嗎?函數不能用於創建圖像
imagestring($im, 5, 5, 5, **$graph->createGraph()**, $text_color)
OR
另一種方式來創建函數輸出作爲數據的圖像?
入住這
<?php
header("Content-Type: image/png");
$im = @imagecreate(110, 20)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>
這是如何解決他的問題?他問你是否可以調用一個函數,而不是提供一個簡單的文本字符串。 – Barmar
好吧,如果該函數調用返回一個字符串你根據''和imagestring()''文件顯然不能。那麼你的_real_問題在這裏? – arkascha
該參數必須是一串文本。看起來不太可能,所謂的'createGraph'會返回文本。 – Barmar
我試圖使用imagestring()創建圖像,而其文本參數採用函數輸出 – Histy