Re: Shell codes
| From: | Joe Stump | Date: | Wed, 29 Nov 2000 17:18:11 +0000 |
| Subject: | Re: Shell codes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27837@lists.php.net to get a copy of this message | ||
If you are trying to get a users home directory when they are running the
script then use getenv("HOME");
--Joe
On Wed, Nov 29, 2000 at 04:04:23PM +0100, Chris Chabot wrote:
> Does anyone know a way to use 'home' in a php shell script?
>
> eg im looking to do:
> #!/usr/local/bin/php
> <?
> echo "line one";
> sleep(1);
> echo "\201\"; // fill in correct 'code' for home..
> echo "line two";
> ?>
>
> where \201 is the code for home (according to termcap), i tried
> echo "\x66" (hex code for home)
> echo "\201" (dec code for home)
> for (i=0;i++;i<79) echo "\b"; (eg echo backspace 80 times)
> echo "^B"
>
> non of the above has the desired effect ... Does anyone know how to do
> this? would help a lot making 'cooler' php shell scripts (think progress
> bars, etc)
>
> Ps, pls cc me in any replies, since im not subscribed to the list
>
> -- Chris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
================================================================================
= Joe Stump joestump98@yahoo.com http://www.miester.org =
================================================================================
Need a programmer? http://www.google.com/search?q=joe+stump+resume