我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

DooPHP:如何从控制器动作输出图像?

In one of the actions I need to return an image to the user. Is there a way to achieve this with DooPHP?

Sample action code:

public function view() {
   $path = $this->params['path']; // contains path to the image

   // $this->render($path); // does not work
}

Thanks and happy holidays!

I wasn't able to find anything in the DooPHP framework and simply ended doing it the php way as described in this answer: https://stackoverflow.com/a/900228/39843

近期文章

  • 灰色大写锁定通知图像显示在密码字段?
  • 基于PHP版本的变体匿名函数定义?
  • php while while循环在获取结果行时莫名其妙地失败
  • 如何在Java Applet和PHP服务器之间进行套接字通信?
  • PHP:调用preg_match的搜索顺序的解决方案
  • 如何使用PHP发送批量邮件
  • 如何解决Aptana调试器超时问题?
  • 应用程序生成的请求使用PHP不工作
  • 如何将PHP url变量传递给AJAX?
  • 如何在视图中格式化dotProject电话号码字段
  • stomp-> hasFrame()返回false,队列中包含消息
  • move_uploaded_file()更改中文文件joomla的名称
  • 在Rails应用程序中运行PHP脚本
  • CURL的PHP​​内存不足错误
  • 在rel窗口中启动重定向url?
  • CakePHP v2模型局部变量
  • 使用Youtube API v3和PHP上传文件
  • 嵌套Silex应用程序
  • too long
  • ob_gzhandler和CSS文件的问题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华