Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

PHP en ligne de commande sous Vista

1 réponse
Avatar
jc
Bonjour,

J'ai installé wampserver sous windows vista et je souhaiterai utiliser php
en ligne de commande.
J'ai configuré la variable d'environnement php avec le chemin suivant
C:\Logiciels\wamp\bin\php\php.exe
Mais lorsque je tape php echo 'toto'; en ligne de commande, rien ne se
passe.

Que dois-je faire?
Y a-t-il un tutoriel?

Merci.

1 réponse

Avatar
John GALLET
J'ai configuré la variable d'environnement php avec le chemin suivant
C:Logicielswampbinphpphp.exe
Mais lorsque je tape php echo 'toto'; en ligne de commande, rien ne se
passe.


Je ne sais pas ce que tu appelles *exactement* "configurer la variable".
Si c'est une variable en DOS, elle commence par $

Chez moi sur unix il se passe ça:

[] ~
Yes Master>php echo 'toto';
Could not open input file: echo

Et sur windows XP:

C:php>php.exe echo 'toto';
Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.4
Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/
No input file specified.

Essaie de faire toto.php qui contienne <?php echo 'toto';?> et
d'exécuter php -l toto.php ou php -f toto.php
(-l comme lint vérifie la syntaxe, -f exécute).

a++
JGA