Re: [PHP] $argv[] ??

2002-03-19 Thread Jason Wong

On Tuesday 19 March 2002 16:18, Kancha . wrote:
 I'm using php 4.1.0. In earlier versions of php i
 could access parameters passed throught command line
 as $argv[1], $argv[2] and so on. With the version that
 i'm usign now it says undefined variable.

 What is the new method of accessign command line
 parameters ??

I think they're turned off by default.


Look in php.ini for

register_argc_argv = ??



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Preserve wildlife -- pickle a squirrel today!
*/

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




Re: [PHP] $argv[] ??

2002-03-19 Thread Kancha .


 On Tuesday 19 March 2002 16:18, Kancha . wrote:
  I'm using php 4.1.0. In earlier versions of php i
  could access parameters passed throught command
 line
  as $argv[1], $argv[2] and so on. With the version
 that
  i'm usign now it says undefined variable.
 
  What is the new method of accessign command line
  parameters ??
 
 I think they're turned off by default.
 
 
 Look in php.ini for
 
 register_argc_argv = ??
 

i have turned it on but still doesn't work. 


__
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

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




RE: [PHP] argv and argc

2002-02-19 Thread Rick Emery

look in the manual under predefined variables:
language.variables.predefined.html

-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 4:00 PM
To: PHP General
Subject: [PHP] argv and argc


The other day, I was reading the docs and I just happened
across something that emulated argc and argv.  However,
I just spent 2 hours in the docs and can't find it.
Is there something in PHP that you can use to get this info?

thnx,
Chris


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

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




RE: [PHP] argv and argc

2002-02-19 Thread Hunter, Ray

Here are all the predefined variables that are in PHP.  You will notice that
there is an argc and argv here.

http://www.php.net/manual/en/language.variables.predefined.php



Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 19, 2002 3:00 PM
To: PHP General
Subject: [PHP] argv and argc


The other day, I was reading the docs and I just happened across something
that emulated argc and argv.  However, I just spent 2 hours in the docs and
can't find it. Is there something in PHP that you can use to get this info?

thnx,
Chris


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



RE: [PHP] argv and argc

2002-02-19 Thread Darren Gamble

Good day,

The array $argv contains what you're looking for (I'm not sure if this is
deprecated in 4.1.0, though) so you'll have to flip through the manual and
release notes.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 3:00 PM
To: PHP General
Subject: [PHP] argv and argc


The other day, I was reading the docs and I just happened
across something that emulated argc and argv.  However,
I just spent 2 hours in the docs and can't find it.
Is there something in PHP that you can use to get this info?

thnx,
Chris


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

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




Re: [PHP] argv and argc

2002-02-19 Thread Chris Boget

 look in the manual under predefined variables:
 language.variables.predefined.html

Sorry, I should have specified for a function, not a script.
I found those vars, just couldn't find the same for a function.
Just found it, though:

func_num_args(); 
func_get_arg();

:)

Chris


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




RE: [PHP] argv and argc

2002-02-19 Thread Martin Towell

IF it is deprecated in 4.1.0, then what are we meant to use in place of it?

Martin

-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 9:04 AM
To: 'Chris Boget'; PHP General
Subject: RE: [PHP] argv and argc


Good day,

The array $argv contains what you're looking for (I'm not sure if this is
deprecated in 4.1.0, though) so you'll have to flip through the manual and
release notes.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Chris Boget [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 3:00 PM
To: PHP General
Subject: [PHP] argv and argc


The other day, I was reading the docs and I just happened
across something that emulated argc and argv.  However,
I just spent 2 hours in the docs and can't find it.
Is there something in PHP that you can use to get this info?

thnx,
Chris


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

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



Re: [PHP] argv

2001-11-23 Thread Andrey Hristov

var_dump($argv);

$argv is an array. Don't expect if you coded in C that this is pointer to the first so 
you possibly want to do echo of the first in
the array.
instead do :
foreach($argv as $param_name = $param_value){
// do your stuff here
}

Regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS


- Original Message -
From: PACKER, Steffan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 23, 2001 7:02 PM
Subject: [PHP] argv


 the $argv is meant to contain all the arguments sent to the script. I need
 to get access to these but when I try to access them I can't!
 if I just use echo($argv) the only output is 'Array'

 All I am expecting to find for the purpose of my script is a five letter
 code, not a name/value pair.

 Can anyone help?

 Thanks,
 Steffan


 
 DISCLAIMER

 Any opinions expressed in this email are those of the individual
 and not necessarily the company.  This email and any files
 transmitted with it, including replies and forwarded copies (which
 may contain alterations) subsequently transmitted from the
 Company, are confidential and solely for the use of the intended
 recipient.  It may contain material protected by attorney-client
 privilege.  If you are not the intended recipient or the person
 responsible for delivering to the intended recipient, be advised
 that you have received this email in error and that any use is
 strictly prohibited.

 If you have received this email in error please notify the Network
 Manager by telephone on +44 (0) 870 243 2431.

 Please then delete this email and destroy any copies of it.
 This email has been swept for viruses before leaving our system.

 Admiral Insurance Services Limited, Cardiff CF10 3AZ
 


 _
 This message has been checked for all known viruses by the
 MessageLabs Virus Scanning Service. For further information visit
 http://www.messagelabs.com/stats.asp



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]