duanjiao5723 2018-04-26 17:52
浏览 44
已采纳

Cakephp:将字符串变量下载为文件

Is it possible to do download a string variable in my code as a file with cakephp ?

For example:

$myString = "value1;value2;value3 1;2;3";

I want to download the string $myString as a csv file without saving it on my server. I just want the user to be able to download the string as a file.

If you have regular php solutions, It can do the job but I prefer to use CakePHP.

Thanks for your help,

Antoine

  • 写回答

2条回答 默认 最新

  • drwo2014 2018-04-27 05:06
    关注

    You have tagged this question with cakephp 2.0

    As burzum points out they have an example exactly for this use case of yours here

    Sending a string as a file

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析