Re: Re: Cronjob
| From: | Robert Cummings | Date: | Wed, 25 Sep 2002 19:02:03 +0000 |
| Subject: | Re: Re: Cronjob | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117623@lists.php.net to get a copy of this message | ||
Daren Cotter wrote:
>
> In any case, register_globals is ON for my server.
>
> I don't understand why this isn't working? I'm doing
> exactly what the manual says. What could I be missing?
No idea the following worked as expected for me:
Script:
<?
$argc = $GLOBALS['HTTP_SERVER_VARS']['argc'];
$argv = $GLOBALS['HTTP_SERVER_VARS']['argv'];
$test = $argv[1];
print $test;
$demo = "This Works";
print $demo;
?>
Execute:
php foo.php blah
Output:
X-Powered-By: PHP/4.1.2
Content-type: text/html
blahThis Works
Cheers,
Rob.
--
.-----------------.
| Robert Cummings |
:-----------------`----------------------------.
| Webdeployer - Chief PHP and Java Programmer |
:----------------------------------------------:
| Mail : mailto:robert.cummings@webmotion.com |
| Phone : (613) 731-4046 x.109 |
:----------------------------------------------:
| Website : http://www.webmotion.com |
| Fax : (613) 260-9545 |
`----------------------------------------------'