If you want to run some PHP code on live website and don’t want to show it’s effect to others

if($_SERVER["REMOTE_ADDR"]=='122.123.123.12'){

// Your PHP code

}

Eg. :

if($_SERVER["REMOTE_ADDR"]=='122.180.87.84'){

die("Just for testing");

}

Leave a Reply

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