- 论坛徽章:
- 0
|
a.html
________________________________________________
<form enctype="multipar/form-data" action="upload.php" method="post">;
<input type="file" name="userfile">;
<input type="submit" value="upload">;
</form>;
upload.php
_________________________________________________
<?php
$uploaddir="/tmp/upload";
echo $userfile."--USERFILE<br>;";
echo $_FILES['userfile']['tmp_name']."--TMP_FILE<br>;";
print_r($_FILES."<br>;" ;
if(move_uploaded_file($_FILES['userfile']['tmp_name'],$uploaddir.$_FILES['userfile']['name'])){
print "uploaded";
}
else {
print "failed";
}
?>;
运行结果
________________________________________________
D:\\unix\\核心的引导.txt--USERFILE
--TMP_FILE
Array
failed
另外 我的 os 是 red hat 7.2
php 是 4.3.1
register_globals 为 On
file_uploads 为 On
请教各位高手这是什么原因引起的!!!!!!!!!!!!!!! |
|