首先将php原生代码写在PHP 中, 结果出现
代码如下:
Route::get('png',function(){ header("Content-type: image/png"); $im = @imagecreate(200, 50) or die("创建图像资源失败"); imagecolorallocate($im, 255, 255, 255); $text_color = imagecolorallocate($im, 0, 0, 255); imagestring($im, 5, 0, 0, "Hello world!", $text_color); imagepng($im); imagedestroy($im); });
版本: Laravel Framework version 5.1.35 (LTS)
谁能告诉我. 谢谢