0

我有一个简单的 html 表单,例如:

<form action="http://localhost/index.php" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<input type="text" name="name"/> Name<br/><br/>
Content<br/>
<textarea name="content" style="width:350px;height: 350px;">

</textarea><br/>
Category: <select name="category">
        <option value="1">ABC</option>
        <option value="2">CBA</option>
    </select>
<br/>
Omage: <input type="file" name="image"/>
<br/>
Swf: <input type="file" name="swf"/><br/>
<input type="submit" value="Save"/>
</form>

如果我在上传文件时选择图像,我可以从 $_POST 获取数据,例如:

Array ( [name] => example [content] => try [category] => 1 ) 

但是当我选择 .swf 文件时,结果是:

Array ( ) 

问题是什么?如何上传 .swf 文件?

4

0 回答 0