We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public function indexAction() { $response = $this->getResponse(); $response->clearBody(); $response->setHeader('Content-Type', 'image/jpeg'); $response->response(); $im = imagecreatetruecolor(120, 40); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); header('Content-Type: image/jpeg'); imagejpeg($im); imagedestroy($im); return FALSE; } // 上面的代码放在yaf中浏览器显示不了图像,提示“图像因存在错误而无法显示”。而同样的代码之间放在一个php文件中执行就没有问题,可以显示。请问是什么地方有问题?
The text was updated successfully, but these errors were encountered:
你把图像下载下来, 用二进制编辑器打开, 看看头部是不是有什么奇怪的东西跑进去了.....
Sorry, something went wrong.
No branches or pull requests
public function indexAction() {
$response = $this->getResponse();
$response->clearBody();
$response->setHeader('Content-Type', 'image/jpeg');
$response->response();
$im = imagecreatetruecolor(120, 40);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
header('Content-Type: image/jpeg');
imagejpeg($im);
imagedestroy($im);
return FALSE;
}
// 上面的代码放在yaf中浏览器显示不了图像,提示“图像因存在错误而无法显示”。而同样的代码之间放在一个php文件中执行就没有问题,可以显示。请问是什么地方有问题?
The text was updated successfully, but these errors were encountered: