Show a "Comments(x)" text (html)
Posted: Tue Jun 08, 2010 12:42 pm
Hi everyone, im including the script into my website, but im looking for a way to show a text ( in the main indx.htm page ) that shows the number of comments made into a post, ive tried the next code:
but that doesnt work if im using a .htm, only if i use .php
-Manuel777
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<?php
define('IN_SCRIPT',true);
require('settings.php');
$lines = file($settings['logfile']);
$total = count($lines);
echo $total;
?>
</body>
</html>
-Manuel777