今天遇到的一个问题及其解决。 这样的一个表单:

<form method=post action="/post.php?_in_form=123">...

在server端:

<?
//取不到$_GET['_in_form']!
?>

查了一些资料 参考: Methods GET and POST in HTML forms - what’s the difference? 关于GET和POST,数据的不同处理

If the method is "get" - -, the user agent takes the value of action,
appends a ? to it, then appends the form data set, encoded using the
application/x-www-form-urlencoded content type. The user agent then
traverses the link to this URI. In this scenario, form data are restricted
to ASCII codes. * If the method is "post" --, the user agent conducts an
HTTP post transaction using the value of the action attribute and a message
created according to the content type specified by the enctype attribute.

结论: get形式的from中,action中的get参数是不会传递的,应该把需要的附加参数作为form隐藏域处理