|
-
Jul 30th, 2007, 10:08 PM
#1
Thread Starter
Fanatic Member
File arguments
If I run the PHP interpreter like this
php some.php something
Can I get the "something" like I get it with static void Main(string[] args) on other language?
Thanks.
Last edited by nebulom; Jul 31st, 2007 at 12:16 AM.
-
Jul 31st, 2007, 12:15 AM
#2
Thread Starter
Fanatic Member
-
Aug 2nd, 2007, 05:37 AM
#3
Hyperactive Member
Re: File arguments
You can use $argv for the argument values, and $argc for the argument count.
» Twitter: @rudi_visser : Website: www.rudiv.se «
If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.
-
Aug 2nd, 2007, 05:53 AM
#4
Re: File arguments
 Originally Posted by RudiVisser
You can use $argv for the argument values, and $argc for the argument count. 
Yes, as long as register_argc_argv is on.
Using $_SERVER is preferable as you can rely on that being available.
-
Aug 2nd, 2007, 05:59 AM
#5
Hyperactive Member
Re: File arguments
I've never seen a server of which that isn't available, plus it's enabled by default and there's no reason to change it.
» Twitter: @rudi_visser : Website: www.rudiv.se «
If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|