0
這裏是我的HTML:POST方法不採取文件輸入
<!DOCTYPE html>
<html>
<head>
<title>This is where we add Party.</title>
</head>
<body>
<form action="viewParties.php" method="post" enctype="multipart/form-data">
PartyList:<br>
<input type="text" name="partylist"><br>
<input type="file" name="pafile"><br><br>
President:<br>
<input type="text" name="president"><br>
<input type="file" name="pfile"><br><br>
Vice President:<br>
<input type="text" name="vicepresident"><br>
<input type="file" name="vpfile"><br><br>
Secretary:<br>
<input type="text" name="secretary"><br>
<input type="file" name="secpfile"><br><br>
<input type="submit" name="submit"><br><br>
</form>
</body>
</html>
基本上我希望發生的是POST方法取這兩個名字和文件位置。但是當我在另一個PHP文件中使用print_r($ _ POST)時,它只顯示名稱。有人知道如何解決這個問題嗎?
use print_r($ _ FILES);打印文件的值 –
這樣寫'enctype =「multipart/form-data」' –
mhmm。 =)有點晚了,但是感謝tho = D –