Hello everyone! I'm having trouble accessing the argument list from a php script, from the command line.
I'm calling the script as >>./myscript.php argument1 argument2 myscript.php contains #!/usr/local/php -q <?php echo "Total aguments passed: $argc\n"; echo "Argument 1: $argv[0] \n argument2: $argv[1]"; ?> $argv and $argc both returns blank. I looked at the global variables ($GLOBALS and $GLOBALS[$argv]) and noticed that $ARGC and $ARGV were not listed. Am I missing something? Is this method outdated? i.e. echo $argv[$i]. It seems like $ARGV is not even present, let alone be an array. Please advise. I'm using PHP 4.2.3 on Apache 1.23.xx and Linux. Thanks in advance! -john =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity Web Developement. Database. Hosting. Multimedia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php