conditional statement featured image

WordPress featured image allow you to upload an image inside your dashboard post and pages. The featured image box is usually on the bottom right corner(may be you need to scroll down to see the box when you land to add new page). Sometimes we don’t have feature image and our area for the feature […]

if condition to detect localhost and server

if condition to detect localhost and server Copy the below php code of if condition to detect localhost and server.  <?php if($_SERVER[‘HTTP_HOST’] ==’localhost:8080′) { define(‘DB_NAME’, ‘localdatabasename’); define(‘DB_USER’, ‘root’);//mostly root define(‘DB_PASSWORD’, ”); } else { define(‘DB_NAME’, ‘server database name’); define(‘DB_USER’, ‘server database user’); define(‘DB_PASSWORD’, ‘dbpassword’); } ?>