Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How can I detect which request type was used(GET, POST, PUT or DELETE) in php?

<p style="text-align:left;"><span>For more details please see the </span><a href="http://php.net/manual/en/reserved.variables.server.php">documentation for the $_SERVER variable</a><span>.</span></p>

user-image
Question ajoutée par Hany Hassan , مدير قسم تكنولوجيا المعلومات , العقاد للاعمال الهندسية
Date de publication: 2015/01/02
هاشم المشارقة
par هاشم المشارقة , Key Account Manager , Advanced United Systems Ltd. ( A member of Taj Holding Group)

 

I think you should use use the variable $_SERVER['REQUEST_METHOD']

Faisal Farooq
par Faisal Farooq , Network & Linux System Support Engineer , RED SIGNAL

$_SERVER variable will let you know that which type of request you are getting. e.g

By using $_SERVER['REQUEST_METHOD']

For further details please see the documentation of $_SERVER variable .

Mohamed Ghareeb
par Mohamed Ghareeb , Senior Full Stack Developer , Aymax

using $_SERVER['REQUEST_METHOD'] you can detect which type of request 

Khalid Dawood
par Khalid Dawood , Senior HR Planning & Development , FMCG Company

By using $_SERVER['REQUEST_METHOD'] For more details please see the documentation for the $_SERVER variable.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?