Re: Command Line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----- From: "- Edwin -" <copperwa11s@xxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Cc: "Travis Conway" <travis@xxxxxxxxxxxxxxxxx>
Sent: Sunday, December 12, 2004 10:40 AM
Subject: Re: Command Line



Hi,

On Sun, 12 Dec 2004 09:15:46 -0600
"Travis Conway" <travis@xxxxxxxxxxxxxxxxx> wrote:

How do you reference command line arguments in php?

i.e., chkmd5.php file.md5

I am wanting to reference file.md5. Since the output of md5sum is
not in the RFC I am having to manually parse each md5 and detect
whether it is in Win32, Linux, or BSD format.

I'm not sure what you meant by that (since an md5 checksum is an md5 checksum) but...


What I mean is that a Win32 md5sum outputs like hash *file

Linux:
file:hash
-or
hash:file

and BSD:
(file) hash

So if I run md5sum -c file.md5 and it was created on another platform, md5sum will not check md5. The hash will be the same but not the file output format. That is all.

And since php has good built in md5() support it helps out.

I think you're looking for "argv":

http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server

PS
Btw, it's "php-geNeral" and not "php-geMeral" ;)

It is much easier to just ask you guys though.

Trav

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux