1.11M Members

PHP parse error ; syntax error ; unexpected error

 
0
 

<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="Raphael.js"></script>
<script type="text/javascript">
<?php
include("class.logger.php"); //path to class.logger.php file
$log = new logger(); //Instentiate the class
$log->dbconnect(); //connect to database
//pass the name of the table as the parameter. I.e. 'logger"
$log->createtable('logger');

//set date and year text for the info bubble that appears on hover
$date = date('F')." ".date('Y');
//load raphael analytics javascript
//Parameters: "table[class], div[id], text[date], width, height, left gutter, bottom gutter, top gutter,stroke color, fontcolor, fill color, grid color
$log->loadraphael('data','holder',$date, 600, 250, 20, 30, 30,'#474747', '#000', '#eee', '#eee');
//load table hits containing data
//Parameters: month, year, div[id], table[class]
$log->dailyhits(11, 2009, 'holder', 'data');
//show total uniqe visitors to date(parameter: (int) number of months). For example: 3 will start counting from 3 monhts before today.
echo $log->totalunique(3);
//show total visits to date(parameter: (int) number of months). For example: 3 will start counting from 3 monhts before today.
echo $log->totalhits(3);
//visit details (parameter (int) number of last visits to display. For example :100 will show last 100 visits
//the info is displayed in a table with visitdetails[class] for easy CSS styling.
$log->visitdetails(100);
?>
</script>
<script type="text/javascript" src="logger.php?t=<?php echo time(); ?>&f=<?php echo $_SERVER; ?>&r=<?php echo urlencode($_SERVER);"></script>
</body>
</html>

Attachments class.logger_.php (12.79KB) logger.php (0.84KB) Raphael.js (207.2KB)
 
0
 

You are missing a ?> tag on line 30 (if you used CODE tags, the lines would be numbered :-). So line 30 should be

<script type="text/javascript" src="logger.php?t=<?php echo time(); ?>&f=<?php echo $_SERVER['REQUEST_URI']; ?>&r=<?php echo urlencode($_SERVER['REQUEST_URL']);?>"></script>

or something similar.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: