How to get directory, domain & IP info?

To get a Valid Domain, Valid IP & Valid Directory of your domain use the below code in any PHP file

<?php
var_dump($_SERVER["SERVER_NAME"]);         
var_dump((isset($_SERVER["SERVER_ADDR"]) ? $_SERVER["SERVER_ADDR"] : $_SERVER["LOCAL_ADDR"]));         
var_dump(dirname(__FILE__));         
?>
  • Check Server Ip, Check Path, Check website path, check file location, get directory, get domain info
  • 27 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

What if I Registered domain name with misspelled

Once a domain is registered we are unable to edit or change the spelling of the domain. We...

How To Add user or delete user/account?

Managing Users in the Client Area To do this: Go to Hello, Name! > User...

How to Disable Network To Install cPanel

In some server provider when you try to install cPanel it asks you to disable network manager so...

cpanel force update ssh

Update WHM/cpanel Using SSH or Terminal/putty   Use This Command:  /scripts/upcp ---force