Home > Backend Development > PHP Tutorial > PHP图片上传解决方案

PHP图片上传解决方案

WBOY
Release: 2016-06-13 10:20:27
Original
805 people have browsed it

PHP图片上传
Notice: Use of undefined constant tmp_name - assumed 'tmp_name' in E:\www\30311\add.php on line 46

Warning: mkdir() [function.mkdir]: Permission denied in E:\www\30311\add.php on line 69

Notice: Use of undefined constant extension - assumed 'extension' in E:\www\30311\add.php on line 74

Warning: move_uploaded_file(upload/1331530339.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in E:\www\30311\add.php on line 82

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\php19E5.tmp' to 'upload/1331530339.jpg' in E:\www\30311\add.php on line 82
移动文件出错!

------解决方案--------------------
没设置允许上传的权限吧,说你mkdir()被拒,有extension未打开
------解决方案--------------------
Notice: Use of undefined constant tmp_name
注意:使用了没有定义的常量 tmp_name

解决方法: 给它加上'tmp_name' 引号。或者可以通过设置php.ini关闭Notice错误级别(就可以使用[tmp_name]了)。

Warning: mkdir() [function.mkdir]: Permission denied
警告: 访问被拒绝。请确认对当前目录有权限。

failed to open stream: No such file or directory
请检查路径是否有问题。

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template