php comment vérifier si la page est accessible via la publication

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Boom baby we a POST method.
}
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// We are a GET method.
}
Disgusted Dotterel