用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2087|回复: 4
收起左侧

[HELP] upload 上传总提示上传路径无效

[复制链接]
发表于 2014-8-13 10:42:39 | 显示全部楼层 |阅读模式
  $config['upload_path'] = '/data/DocumentRoot/default/hraline_new/attachments/avatar/';
  $config['allowed_types'] = 'gif|jpg|png';
  $config['max_size'] = '10000';
  $config['max_width']  = '1024';
  $config['max_height']  = '768';

服务器上 /data/DocumentRoot/default/hraline_new/attachments/avatar 这个路径应该没错吧


求助各位大侠


发表于 2014-8-13 11:29:33 | 显示全部楼层
有问题吧,你的WWW的文件夹在什么位置啊。
发表于 2014-8-13 11:45:27 | 显示全部楼层
看看路径是否存在,路径是否可写。
发表于 2014-8-20 17:37:24 | 显示全部楼层
<input type="file" name="userfile" size="20" />
name这里一定要userfile
发表于 2014-8-22 09:38:56 | 显示全部楼层
通过源代码你可以看到,两种情况会报这个错误,一个是上传路径为空,一个是上传路径不是一个合法的目录,你的明显是第二种错误,如果你是网站根目录下的data,试试
./data/DocumentRoot/default/hraline_new/attachments/avatar/
这样写

本版积分规则