Jump to content


Photo

Parameter to a script


  • Please log in to reply
1 reply to this topic

#1 alexis101

alexis101
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 10 March 2006 - 12:32 AM

I need to execute a php script in a console. And i need to pass it a parameter. If it was a web page i know it would be something like
asd.php?parameter="asd"
But this wont work in console.
Anyone know how to do this

#2 wickning1

wickning1
  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 10 March 2006 - 12:34 AM

It should be sitting in the $argv global array. See here for more info:

[a href=\"http://us2.php.net/manual/en/features.commandline.php\" target=\"_blank\"]http://us2.php.net/manual/en/features.commandline.php[/a]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users