RE: [PHP] $HOST_NAME
| From: | jeremy brand | Date: | Wed, 29 Nov 2000 23:11:13 +0000 |
| Subject: | RE: [PHP] $HOST_NAME | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27915@lists.php.net to get a copy of this message | ||
Chris,
uname is a standard UNIX command. The -n flag says to tell you the
machine's network node name -- usually the FQDN.
``'s just one way of executing external programs in PHP. You could
also use system() or exec(). I mostly use ``'s because it is quick
and when I don't care about the return value of the program I'm
executing, this does just fine. system() and exec() have their
advantages, but I don't use then when I don't use them when the
advantage is of no advantage to me.
:)
-jeremy
(I'm CC:ing the list because this may be helpfull).
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
- - - - - - - - - - - - - - - - - - - - - - - - -
"We're all Linux all the time, and very proud of it"
Jim Reese, Chief Operations Engineer, Google.com
On Wed, 29 Nov 2000, Boget, Chris wrote:
> Date: Wed, 29 Nov 2000 17:08:11 -0600
> From: "Boget, Chris" <Chris.Boget@wild.net>
> To: 'jeremy brand' <jeremy@nirvani.net>
> Subject: RE: [PHP] $HOST_NAME
>
> > Something happend either with your code or your server. Voodoo
> > computing doesn't exist. There IS an explanation, even if you don't
> > know it.
>
> I asked out network admins and they said nothing changed.
>
> > Try
> > $my_host =
uname -n;
> > This won't lie!
>
> Is this an exec command?
>
> Chris
>