我已經制作了一個帶有上傳圖片選項的聯繫表格。它在WordPress(我的表單是我製作的自定義插件的一部分)。文件上傳不起作用
每次我上傳一個文件,我發現$ _FILE是空的。
這裏是我的表單的代碼。
<table>
<tr>
<td valign="top">
<form action="" method="post" enctype="multipart/form-data">
<table cellspacing="0" cellpadding="0" bordercolor="#000000" border="0" bgcolor="#ffffff" width="100%">
<tbody>
<tr>
<td width="100%">
<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tbody>
<tr>
<td width="50%" height="35" >Your Name:<span >*</span></td>
<td width="50%"><font size="2" face="Arial" color="#000000">
<input type="text" size="20" value="" id="name" name="formAppName"></font>
</td>
</tr>
<tr>
<td height="35" >Your Web Address:<span >*</span></td>
<td><font size="2" face="Arial" color="#000000">
<input type="text" size="20" value="" id="webAddress" name="webAddress"></font>
</td>
</tr>
<tr>
<td height="35" >E-mail Address:<span >*</span></td>
<td><input type="text" size="20" value="" id="email" name="email"></td>
</tr>
<tr>
<td height="35" >Subject title:<span >*</span></td>
<td><font size="2" face="Arial" color="#000000">
<input type="text" size="30" value="" id="subjectTitle" name="subjectTitle"></font>
</td>
</tr>
<tr>
<td height="35" >Upload Photo:<span >*</span></td>
<td><font size="2" face="Arial" color="#000000">
<input type="file" size="25" id="formAppPhoto" name="formAppPhoto"></font>
</td>
</tr>
<tr>
<td colspan="2">Body Text:<span >*</span></td>
</tr>
<tr>
<td colspan="2">
<textarea rows="25" cols="65" name="bodyText"></textarea>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr><td colspan="2"><input type="submit" value="Submit" name="Submit"></td></tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<input type="hidden" name="formAppDo" value="45645645" />
<input type="hidden" name="formAppId" value="98" />
</form>
</td>
</tr>
這是錯誤!非常感謝。 :-) 傻我! – kapeels 2010-07-09 08:31:20
哈哈,hhahahh:] – 2010-07-09 08:37:58