我想使用PHP forms
. 为此,我创建了一个如下表格:
<form method="post" action="uploadimage.php" id="FileUploader" enctype="multipart/form-data">
<div class="control-group">
<label class="control-label" for="file">Upload Image</label>
<div class="controls">
<input type="text" id="Fifle" name="name" />
<input type="file" id="File" name="mFile" />
</div>
</div>
<input type="submit" class="btn btn-info" name="submit" value="Upload" />
</form>
在uploadimage.php
我写:
<?php
$UploadDirectory = 'upload/'; //Upload Directory, ends with slash & make sure folder exist
$MySql_username = "root"; //mysql username
$MySql_password = ""; //mysql password
$MySql_hostname = "localhost"; //hostname
$MySql_databasename = 'mydb'; //databasename
if (!@file_exists($UploadDirectory)) {
//destination folder does not exist
die("Make sure Upload directory exist!");
}
print_r($_POST);
但是当我试图发布它时它正在返回Array ( )
请大家帮帮我我做错了什么?