Created
September 10, 2013 22:01
-
-
Save shahariaazam/6516364 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//echo "<a href=""http" . (($_SERVER['SERVER_PORT']==443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] . $curdir . "index.php"">Go To Your Blog</a>" . "<br>"; | |
/* Try to avoid mixing up your PHP and HTML . | |
* always try to make CLEAN code | |
*/ | |
if($_SERVER['SERVER_PORT']==443)){ | |
$url = "https://".$_SERVER['HTTP_HOST'].$curdir."index.php"; | |
}else{ | |
$url = "https://".$_SERVER['HTTP_HOST'].$curdir."index.php"; | |
} | |
?> | |
<a href ='$url'>Go to your blog</a><br> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment