duanhuiqing9528 2013-07-03 12:19
浏览 43
已采纳

使用cakephp maldicore管理插件上传文件

I am using Maldicore admin plugin, and I have a problem with the file upload.

It basically boils down to that:

Calling $this->request->data at the controller only gives the following data

Array
(
    [Spice] => Array
        (
            [id] => 1
            [name] => Black Pepper Seeds
            [image] => black pepper seeds.jpg
        )

)

When most of the online sources list attributes like ['tmp_name'], ['error'], and etc. What am I missing out here?

Thanks in advance!

  • 写回答

1条回答 默认 最新

  • dtzh131555 2013-07-03 14:09
    关注

    I'm pretty sure you did not make your form a multi-part / file form, in CakePHP you can do it this way:

    $this->Form->create('Model', array('type' => 'file'));
    

    If you don't use the right form type the file appears usually like what you pasted.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于作物生长模型下,有限水资源的最大化粮食产量的资源优化模型建立
  • ¥20 关于变压器的具体案例分析
  • ¥15 生成的QRCode圖片加上下載按鈕
  • ¥15 板材切割优化算法,数学建模,python,lingo
  • ¥15 科来模拟ARP欺骗困惑求解
  • ¥100 iOS开发关于快捷指令截屏后如何将截屏(或从截屏中提取出的文本)回传给本应用并打开指定页面
  • ¥15 unity连接Sqlserver
  • ¥15 图中这种约束条件lingo该怎么表示出来
  • ¥15 VSCode里的Prettier如何实现等式赋值后的对齐效果?
  • ¥20 keepalive配置业务服务双机单活的方法。业务服务一定是要双机单活的方式