How to get current domain in php?


Here is simple way.

 

Follow the steps.

 

Step-1

Create a index.php page in your website.

 

Step-2

Now, add following codes in your index.php and save it.

<?php echo”.$_SERVER[‘REQUEST_URI’].” ?>

 

Step-3

Then, View: yourdomain.com/index.php

 

Done.

 



Find More related How to get current domain in php?


Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *