> -Original Message-
> From: Evan Nemerson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 10, 2003 9:32 PM
> To: Jake McHenry; [EMAIL PROTECTED]
> Subject: Re: [PHP] Php shell scripting
>
>
> On Thursday 11 December 2003 12:31 am, Jake McHenry wrote:
&g
On Thursday 11 December 2003 12:31 am, Jake McHenry wrote:
> Does anyone know how I can pass variables into a script being executed
> from the command line?
>
> I have a script, named testscript. So far, I have been getting all my
> variables from the system env command, not a big deal. But I want
$argv, possibly $_SERVER['argv'].
Cheers,
Rob.
On Thu, 2003-12-11 at 00:31, Jake McHenry wrote:
> Does anyone know how I can pass variables into a script being executed
> from the command line?
>
> I have a script, named testscript. So far, I have been getting all my
> variables from the system
You don't have ./ in your $PATH so you must type ./test.php to execute it
Leif K-Brooks wrote:
I'm trying to do shell scripting in PHP. I have PHP installed in
/usr/bin/php. I have the following script:
#!/usr/bin/php -q
print "Success!\n";
?>
It's saved as test.php and CHMODed to 777. When
In Unix you need to specify the working folder when you are launching an
executable, otherwise Bash will try to look into its search path, which
does not include the current folder. Try:
./test.php
That should work. BTW--running "test" by itself only *looks* like
hitting enter--it's really a vali
Ever answered your own question five seconds after asking it?
Apparently, I have to type "/path/to/test.php" even though I'm already
in the right directory.
Leif K-Brooks wrote:
I'm trying to do shell scripting in PHP. I have PHP installed in
/usr/bin/php. I have the following script:
#!/usr
-
Ryan Christensen
> -Original Message-
> From: Kees Hoekzema [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 22, 2001 11:41 AM
> To: Ryan Christensen
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] PHP shell scripting..
>
>
> Hello Ryan,
>
> Let me gi
gt; From: Ryan Christensen [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 22, 2001 8:30 PM
> To: 'Kees Hoekzema'
> Subject: RE: [PHP] PHP shell scripting..
>
>
> I'm slightly confused as to how I would run this from a shell though..
> what would I enter in the comma
Hello Ryan,
You can use environment variables for that, like:
echo $HOME; /* Shows the HOME environment variable, if set. */
You can also use getenv() en putenv()
see also:
http://nl.php.net/manual/en/language.variables.external.php
hope it works :)
- Kees
> -Original Message-
> Fro
9 matches
Mail list logo