Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在开发一个应该处理发布请求的 Magento 控制器。
我可以检查请求是否为 POST 并提取参数,但我想知道是否有标准方法来检查请求期间是否传递了特定参数。
你会怎么做?
$email = $this->getRequest()->getPost('email');
或者
$email = isset($_POST['email']) ? $_POST['email'] : null;
一样。