【问题标题】:How to use FormHelper postLink to upload a singlefile in Cake 2.3Cake 2.3 中如何使用 FormHelper postLink 上传单个文件
【发布时间】:2013-07-08 09:50:00
【问题描述】:

这是 Cake 2.3 中 FormHelper 的 postLink 方法。

http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::postLink

我想知道我是否可以用它来上传单个文件而不是用它来删除。

【问题讨论】:

    标签: cakephp cakephp-2.0 formhelper


    【解决方案1】:

    没有

    该函数创建了一个看起来像链接的表单。上传文件可以通过appropriate usage of the form helper实现,例如:

    echo $this->Form->create('User', array('type' => 'file'));
    echo $this->Form->file('avatar');
    echo $this->Form->submit();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-24
      • 2012-01-08
      • 1970-01-01
      相关资源
      最近更新 更多