我试图让 File 元素在 pfbc 中工作,但除了文件名之外我没有得到任何东西$_POST['AvatarLrg']
,$_FILES
是空的。有没有人有一个我可以细读的工作示例?
在顶部:
<?php
$form = new Form('trucking_edit');
$form->configure(array( "enctype" => "multipart/form-data" ));
$form->addElement(new Element_File("Profile Avatar:", "AvatarLrg"));
$form->addElement(new Element_Button);
?>
在体内:
<?php $form->render(); ?>
表单显示正常,所有其他元素显示并正常工作,只有文件:/任何帮助表示赞赏。
编辑:生成的 HTML:
<form method="POST" id="edit_profile" action="profile.php?pid=16&edit=save" name="tf_profileedit">
...
<div class="control-group">
<label class="control-label" for="trucking_edit-element-3">Profile Avatar:</label>
<div class="controls">
<input type="file" name="AvatarLrg" id="trucking_edit-element-3"/>
</div>
</div>
...
</form>