Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cakephp 如何在Cake 2.3中使用FormHelper postLink上载单个文件_Cakephp_Cakephp 2.0_Formhelper - Fatal编程技术网

Cakephp 如何在Cake 2.3中使用FormHelper postLink上载单个文件

Cakephp 如何在Cake 2.3中使用FormHelper postLink上载单个文件,cakephp,cakephp-2.0,formhelper,Cakephp,Cakephp 2.0,Formhelper,这是Cake 2.3中FormHelper的postLink方法 我想知道我是否可以用它来上传一个文件,而不是用它来删除。否 该函数创建一个看起来像链接的表单。上传文件可通过以下方式实现,例如: 不 该函数创建一个看起来像链接的表单。上传文件可通过以下方式实现,例如: echo $this->Form->create('User', array('type' => 'file')); echo $this->Form->file('avatar'); echo $

这是Cake 2.3中FormHelper的postLink方法

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

否 该函数创建一个看起来像链接的表单。上传文件可通过以下方式实现,例如:

不 该函数创建一个看起来像链接的表单。上传文件可通过以下方式实现,例如:

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