更新时间:2022-03-11 01:05:08
通过使用
$_SERVER['REQUEST_METHOD']
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// The request is using the POST method
}
有关更多详细信息,请参阅 $_SERVER 变量的文档.
For more details please see the documentation for the $_SERVER variable.