2016-11-30 00:00:00嘉辉 Linux认证
在LAMP环境中,测试一个简单的php文件上传功能时,发现/var/log/apache2/error.log中出现如下php警告:
[Tue Jan 31 09:40:27 2012] [error] [client 127.0.0.1] PHP Warning: move_uploaded_file(/home/leotody/32883679.jpeg): failed to open stream: Permission denied in /var/www/upload_file.php on line 25, referer: http://localhost/info.html
[Tue Jan 31 09:40:27 2012] [error] [client 127.0.0.1] PHP Warning: move_uploaded_file(): Unable to move '/tmp/phps05ssU' to '/home/leotody/32883679.jpeg'in /var/www/upload_file.php on line 25, referer: http://localhost/info.html
提示没有访问权限,文件上传的代码如下:
if (file_exists("upload/" . $_FILES ..........
阅读全文[Linux认证]热门推荐
861
人