我得到了一切,但这工作。我无法使move_uploaded_file();
正常工作。php上传文件
$ups_path = "ups/files";
$nfile = $_FILES['nfile']['tmp_name'];
$cfile = move_uploaded_file($nfile, $ups_path);
if($cfile){
header ('Location: index.php?give=fileuploaded');
} else {
header ('Location: index.php?give=filenotuploaded');
}
它总是返回不移动它的错误。
'$ ups_path'应该是绝对的。 – Orbling 2011-05-14 13:28:22
*你得到了什么*错误?注意,'mysql_real_escape_string()'在这一点上没有用处。它不会删除文件名中的非法字符。 – 2011-05-14 13:28:24
为什么在'tmp_name'上使用'mysql_real_escape_string'?可能你正在改变弦乐。检查是否是这种情况。 – 2011-05-14 13:33:47