Approve POST verb request

How do you provide early enough in the PHP request pipeline, the POST verb and refuse others?

+5
source share
1 answer

This should work:

if ($_SERVER['REQUEST_METHOD'] != 'POST') die();
+11
source

All Articles