Noplay >>Développement


Niveau: Confirmé
Licence de l’article: Free Documentation License

version imprimable

Détecter comment PHP est lancé

le lundi 4 juin 2007 par
Noplay

Il est parfois intéressant de savoir comment a été lance PHP (module apache, cgi, cli)

Cela peut se faire très simplement à l’aide de la fonction php_sapi_name.

Par exemple pour vérifier que php est lancée en ligne de commande :


if (php_sapi_name() != "cli") {
   echo "Ligne de commande";
}
 

La documentation de php_sapi_name



commentaires (5 message(s))

Détecter comment PHP est lancé
le 6 mars , par fSQkUSHnKIzmF:

CIu7pF Excellent article, I will take note. Many thanks for the story !



Détecter comment PHP est lancé
le 23 octobre , par iWNrBTUVjbRySDwpvSj:

Everyone needs help at some point. ,



Détecter comment PHP est lancé
le 13 octobre , par fEdpBJylRbHHir:

I got a perfect amazingly accurate hit of the wrong one. ,



Détecter comment PHP est lancé
le 12 octobre , par IANGNakWhbORKZQO:

doors.txt ;10;15



Exam 70-649 : TS : Upgrading MCSE on Windows Server 2003 to Windows Server 2008, Technology Specialist, became available in October 2007. This Technology Specialist (TS) exam fulfills the Microsoft Certified Technology Specialist (MCTS) on Windows Server 2008 requirements of Exams 70-640, 70-642, and 70-643.
le 20 mai , par YCX:

Exam 70-649 : TS : Upgrading MCSE on Windows Server 2003 to Windows Server 2008, Technology Specialist, became available in October 2007. This Technology Specialist (TS) exam fulfills the Microsoft Certified Technology Specialist (MCTS) on Windows Server 2008 requirements of Exams 70-640, 70-642, and 70-643. The Most Popular Certifications List : CCIE | CCNA test | -YCX



Répondre à cet article


Un message, un commentaire ?
  • (Pour créer des paragraphes, laissez simplement des lignes vides.)

Qui êtes-vous ? (optionnel)



Webmaster Noplay