【发布时间】:2012-08-29 15:35:45
【问题描述】:
您好,我是 PHP 和 CodeIgniter 的新手,遇到以下问题
我有一个控制器,我想在其中调用在另一个 .php 上定义的 PHP 函数。
这是函数:
function createNote($note_text){
header('Content-type: image/jpeg');
$note = "./application/controllers/notes/note.jpg";
$rImg = ImageCreateFromJPEG($note);
imagejpeg($rImg);
//After this I want to use the "imagettftext" function to insert the $note_text in
//the image
}
这应该加载该图像并显示它(我猜)但它没有,而是显示以下内容:
我知道图像的路径是正确的,因为如果我更改它,ImageCreateFromJPEF 会返回一个错误,指出找不到图像...
有什么想法吗?
提前致谢!
【问题讨论】:
-
您能否向我们展示一下您网站根目录下的 .htaccess 文件是什么样的?
-
问题解决了吗。如果解决了怎么办?
-
@Ts8060 检查这个答案stackoverflow.com/questions/1397014/…
标签: php image codeigniter