无标题文档
*/
$uploaddir='/tmp/';
$uploadfile=$uploaddir.$_FILES['upload_file']['name'];
print"
";
if (move_uploaded_file($_FILES['upload_file']['tmp_name'],$uploadfile)) {
print"上传成功,如下是调试信息;\n";
print_r($_FILES);
}else{
print"上传失败,如下是调试信息;\n";
print_r($_FILES);
}
print"
";
?>
另:
$upfile = '/uploads/'.$_FILES['userfile']['name'];
if (is_upload_file($_FILES['userfile']['tmp_name']))
{
if (!move_uploaded_file($_FILES['userfile']['tmp_name'], $upfile))
{
echo 'problem: could not move file to dst dir';
exit;
}
}
阅读(2126) | 评论(0) | 转发(0) |