Home > php教程 > php手册 > 头像编辑-当不改变头像时

头像编辑-当不改变头像时

WBOY
Release: 2016-06-07 11:45:50
Original
1248 people have browsed it

目前是这么做的
头像编辑-当不改变头像时 将上传判断代码段  /*  if(!$upload->upload()) {// 上传错误提示错误信息<br>     $this->error($upload->getErrorMsg());<br>  }else{// 上传成功 获取上传文件信息 <br>     $info =  $upload->getUploadFileInfo();<br>  }  */ 改为:$upload->upload();<br> $info =  $upload->getUploadFileInfo();这样即使不上传图片也不提示错误, 然后在上传页面 添加<input><input> 在update()方法中做如下判断:if(is_null($info[0]["savename"])){<br>     $data['face']=$_POST['face'];<br> }else{<br>     $data['face']=$info[0]["savename"];<br> }

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template