数组到字符串上传图像时出错 [英] Array to string Error while uploading an Image

查看:181
本文介绍了数组到字符串上传图像时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用cakephp上传图像,我得到以下错误:

i was trying to upload image using cakephp , i got the following error :

注意(8):数组到字符串转换[CORE\Cake\Model \Datasource\DboSource.php,line 1009]

Notice (8): Array to string conversion [CORE\Cake\Model\Datasource\DboSource.php, line 1009]

<?php echo $this->Form->create('User',array('type'=>'file')); 
      echo $this->Form->input('profile_pic', array('type'=>'file')); 
      echo $this->Form->end('submit');
?>

我做了什么错误?

推荐答案

你正确地学习cakephp手册如何表单类型可以是File ??? :)

You study cakephp manual properly HOW form type can be File ?????? :)

使用此

<?php echo $this->Form->create('User',array('enctype'=>'multipart/form-data')); 
      echo $this->Form->input('profile_pic', array('type'=>'file')); 
      echo $this->Form->end('submit');
?>

这篇关于数组到字符串上传图像时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆