我有一个文件上传表单,这里是:
<form action="./wp-content/themes/backyard-cures/upload_file.php" method="post" enctype="multipart/form-data">
<div class="edit-profile-field" id="edit-profile-pic-wrap">
<h1 class="profile-descriptor" id="edit-username-label">Public Picture Upload</h1>
<div id="profile-pic-border">
<?php get_avatar(get_current_user_id(), 225); ?>
</div>
<input type="file" name="edit-pic[file]" id="pic-upload" size="225">
<input id="edit-pic-submit" type="submit" name="edit-pic-submit" value="Upload New Avatar">
</div>
</form>
表单发布到以下脚本:
if(isset( $_POST['edit-pic-submit']) ) {
echo "000";
}
$temp = explode(".", $_FILES["file"]["error"]);
print_r($temp);
该脚本具有以下输出:
数组([0] =&gt;)
我无法弄清楚为什么没有发布任何内容。提前致谢