<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
This above code is use to get the page url..
Now i want to result from above code in a html code..
<?php
$r .= '<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="I WANT THE ANSWER IN HERE" num_posts="2" width="400"></fb:comments>';
?>
Thank you..
Try this :
PHP_EOL;ensures a line break in your document (makes it more readable, if you click view source).