Afficher un message
Vieux 27/03/2008, 20h14   #1
Defranco
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut PHP CLI: Sending parameters via command line

Hi all,

How do a run a .php file via shell script (CLI ) but providing
parameters?

For example to run foo.php in unix I run the command:

php foo.php

But how do I pass parameters like in web interface: foo.php?
param1=value&param2=value2 via command Line?

The command:

php foo.php?arg1=value&arg2=value2

Will not work and the just explain how to pass arguments that I
understand that is not parameters like in web - I can not modify
foo.php to make it get arguments, only standard web parameters
(retrieved via $_GET ).

Thanks

Erico
  Réponse avec citation
 
Page generated in 0,04420 seconds with 9 queries