先改成下面这样,输出文件上传错误代码看看.另外,服务器是什么操作系统?如果是Linux的话,考虑运行WEB服务的用户对upload文件夹是否具有w权限.
<?php
echo $_FILES['userfile']['error'];
/*$filename = $_FILES['userfile']['name'];
$destination_file = '../uploadfile/'.$filename;
if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $destination_file))
{
return;
}*/
?>
<?php
echo $_FILES['userfile']['error'];
/*$filename = $_FILES['userfile']['name'];
$destination_file = '../uploadfile/'.$filename;
if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $destination_file))
{
return;
}*/
?>
解决方案 »
- 防止CSRF 攻击的方法tokens bound to a separate domain
- unserialize 返回空
- apache+php错误
- 初来乍到,临时求教一个的问题
- php咋连接sqlserver window身份验证数据库啊??
- 图像因其本身有错无法显示
- 怎么使文本显示以后,使其部分文字能连接到其他页面?谢谢!因初学所以问题很多.Please teach me!
- 睡可以详细说一下header()的 用法
- 在php界面select下拉框出不来
- phpstorm 运行文件,开始正常,后面出现502 bad gateway
- mysql administrator连接局域网数据库
- Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\AppServ\www\GuestBookDream\index_.php
echo $_FILES['userfile']['error'];
/*$filename = $_FILES['userfile']['name'];
$destination_file = '../uploadfile/'.$filename;
if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $destination_file))
{
return;
}*/
?>
这个输出显示的是0..