你知道这里有什么问题吗?我什么也找不到。
这打印:
echo $_FILES["new_text_file"]["name"];
这也是:
echo $_FILES["new_text_file"]["tmp_name"];
php:
"; echo $_FILES["new_text_file"]["tmp_name"]; //上传文本文件到服务器
if(move_uploaded_file($_FILES["new_text_file"]["tmp_name"]), $_FILES["new_text_file"]["name"])
{
//header('Location: ga-dev-exercise-pavan.php');
echo 'worked';
}else {
echo 'did not work';
}
}
?>
html:
<form enctype="multipart/form-data" action="ga-dev-exercise-pavan.php" method="POST">
Choose a text file you want to upload and search through:
<input type='file' name='new_text_file'>
<input type="hidden" name="submit_yes_file" value="true" />
<br /><br />
<input type="submit" value="upload">
</form>