kohana 3 不使用任何模块上传图像?
有人有在 kohana 3 中上传图像而不最终使用任何模块的示例吗?
有没有简单快捷的方法可以在基于 kohana 3 的网站上上传文件?
谢谢!
does anybody have an example of uploading images in kohana 3 without using any modules eventually ?
i used https://github.com/kohana/image/tree/3.1%2Fmaster but my error is: Fatal error: Uncaught Kohana_Exception [ 0 ]: Installed GD does not support images
is there any easy and fast way to upload files in a kohana 3 based website?
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Kohana API 应该有所帮助。
基本步骤是:
$array = Validation::factory($_FILES);
)$array->rule('file', 'Upload::not_empty ')->rule('file', 'Upload::type', array(array('jpg', 'png', 'gif')));
)if ($array->check())
)$filepath = Upload::save($_FILES['file'], 'uploaded_file', 'upload_dir');< /代码>)
Kohana API should help.
Basic steps are:
$array = Validation::factory($_FILES);
)$array->rule('file', 'Upload::not_empty')->rule('file', 'Upload::type', array(array('jpg', 'png', 'gif')));
)if ($array->check())
)$filepath = Upload::save($_FILES['file'], 'uploaded_file', 'upload_dir');
)这会对您有所帮助:)
http://forum.kohanaframework.org/discussion/6988/ko3-k03-image-library-installed-gd-does-not-support-images/p1
This will help you :)
http://forum.kohanaframework.org/discussion/6988/ko3-k03-image-library-installed-gd-does-not-support-images/p1