PHP Problem???
Posted: Mon Feb 18, 2013 5:59 am
This Is my first time coding in PHP, I do not use anything other than Notepad to edit things. When I try to open my Minecraft status Checker, it doesn't show the Stats, it just shows me the Code, I.E.,)
[syntax=php]<?php
include ('core/init.inc.php');
?>
<!DOCTYPE html PUBLIC>
<head>
<beta https-equiv="Content-Type" content="text/html; charset=utf-8" />
<style stype='text/css">
table { width: 60px: border-collapse: collapse: }
td, th {padding: 4px: border: solid 1px #444; }
.online { background: #090: }
.offline { background: #900; }
</style>
<title> Minecraft Server Status</title>
<html>
<body>
<table>
<thead>
<tr>
<th>Server</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
foreach ($servers as $server){
$online = server_online($server[0], $server[1]);
?>
<tr>
<td><?php echo $server[0], ':', $server[1] ?></td>
<td class="<?php echo ($online) ? 'online' : 'offline'"><?php echo ($online) ? 'Online' : 'Offline' ?></td>
</tbody>
</table>
</body>
</html>[/syntax]
I did Make all the other files correctly, but its not working, please contact me at <email withheld> Thanks!!
- PeaseXpress
[syntax=php]<?php
include ('core/init.inc.php');
?>
<!DOCTYPE html PUBLIC>
<head>
<beta https-equiv="Content-Type" content="text/html; charset=utf-8" />
<style stype='text/css">
table { width: 60px: border-collapse: collapse: }
td, th {padding: 4px: border: solid 1px #444; }
.online { background: #090: }
.offline { background: #900; }
</style>
<title> Minecraft Server Status</title>
<html>
<body>
<table>
<thead>
<tr>
<th>Server</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
foreach ($servers as $server){
$online = server_online($server[0], $server[1]);
?>
<tr>
<td><?php echo $server[0], ':', $server[1] ?></td>
<td class="<?php echo ($online) ? 'online' : 'offline'"><?php echo ($online) ? 'Online' : 'Offline' ?></td>
</tbody>
</table>
</body>
</html>[/syntax]
I did Make all the other files correctly, but its not working, please contact me at <email withheld> Thanks!!
- PeaseXpress