开发者

Behaviour change when enctype attribute missing on <form> tag

I recently switched from a VPS server to a dedicated server. For some reason, on a custom CMS I was working on, all the forms stopped working. Instead of processing the block of execution under if($_P开发者_如何学PythonOST) it would just re-load an empty form. So I experimented by adding enctype="multipart/form-data". That worked...

Anyhow, I'm wondering, before I commit to changing ALL my forms, is there a PHP setting of some sort that I'm missing that would fix this universally?


there could be some reasons:

if you don't set enctype="multipart/form-data" although you send some files in your form

or if there is a wrong value in the php.ini in post_max_size, for example if in php.ini is written post_max_size=8MB instead of 8M then php will treat this as 0 cause 8MB is not a valid value. if so, then no data can be transmitted by post

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜