我想将URL设置为account.php?action=...
,但是它总是将URL设置为
account.php?file=...
我如何避免这种情况?
<form action="account.php?action=uploadprofileimage" enctype="multipart/form-data">
<div id="uploadprofileimagewrapper">
<input id="uploadprofileimage" type="file" name="file" onchange="form.submit()">
</div>
</form>
那么如何设置“ URL”?
我想禁用file=...
或在URL中同时包含二者时,因此file=...
和 action=...
感谢您的帮助
答案 0 :(得分:1)
您应该在method
中添加<form>
属性,并将其设置为post
:
<form action="account.php?action=uploadprofileimage" enctype="multipart/form-data" method="post">
<div id="uploadprofileimagewrapper">
<input id="uploadprofileimage" type="file" name="file" onchange="form.submit()">
</div>
</form>