我得到了一切,但這工作。我無法使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