I got a simple php page like this:
<?php
include 'config.php';
include 'lib.php';
header("Content-type: text/html; charset=UTF-8");
?>
<html>
<head>
<title>view states</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
</head>
<body>
<div id="container">
WTF?
</div>
</body>
</html>
when i have the code below in my lib.php, my dom just contains a head and body. The title is gone, the div container is gone and the text 'wtf?' also.
What's wrong?
class State {
$id;
$ip;
$state;
$date;
$played;
function __construct($id, $ip, $state, $date, $played) {
$this->$id = $id;
$this->$ip = $ip;
$this->$state = $$state;
$this->$date = $date;
$this->$played = $played;
}
}