|
Posted by Z.K. on 09/10/07 01:08
macca wrote:
> Try something like:
>
> echo $_SERVER['SERVER_ADDR'];
>
>
>
>
> Tip: type this and save it as phpinfo.php
>
>
> <?php
>
> phpinfo();
>
> ?>
>
> Run the file and you will get loads of useful info about your PHP
> installation including many of the PREDIFINED VARIABLES that you can
> access from in your scripts. SERVER_ADDR is one of them.
>
>
> As for a reference book, you can't do any better than the php manual
> at
>
> http://www.php.net/manual/en/index.php
>
> Which you can also download to your computer free from php.net
>
>
>
> Regards,
>
> Paul.
>
Thanks for the info. Unfortunately, it did not help me much as it only
listed localhost and 127.0.0.1. I was looking for the actual IP address
assigned by the DHCP server. When I right click on the network icon in
the system tray and then go to status->support, it lists it correctly
and it should be possible to extract that information, but I don't have
the knowledge of how to do that as yet. Still, thanks anyway.
Z.K.
Navigation:
[Reply to this message]
|