ich Poste jetzt mal die Codes!
die index.php sieht wie folgt aus (aktuell)
[code=php]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
$fileToInclude = "home.php";
if (isset($_GET["site"]))
{
$site = $_GET["site"];
if (strlen($site) != 0)
{
if ($site == "home")
$fileToInclude = "home.php";
if ($site == "sys_inf")
$fileToInclude = "system.php";
}
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<meta name="generator" content="Adobe GoLive" />
<title>Diskus-Tempel NBG Diskuszucht Nürnberg</title>
</head>
<body>
<table width="995" border="0" cellspacing="2" cellpadding="0" height="908">
<tr>
<td align="left" valign="top" background="backr.jpg">
<table width="987" border="0" cellspacing="2" cellpadding="0" height="862">
<tr height="260">
<td width="179" height="260"></td>
<td align="left" valign="top" width="794" height="260">
<table width="771" border="0" cellspacing="2" cellpadding="0" height="128">
<tr height="19">
<td width="290" height="19"></td>
<td height="19"></td>
</tr>
<tr>
<td width="290"></td>
<td align="center" valign="top"><br /><?php include ("aktuell.php"); ?>
</td>
</tr>
</table>
</td>
</tr>
<tr height="480">
<td align="center" valign="top" width="179" height="480"><a href="index.php?site=home">Home</a><br />
<strong>Nürnberg<br>
</strong><br>
<a href="index.php?site=sys_inf">System-Info</a><br />
</td>
<td align="left" valign="top" width="794" height="480">
<table width="624" border="0" cellspacing="2" cellpadding="0" height="570">
<tr>
<td align="center" valign="top"><? include($fileToInclude); ?></td>
</tr>
</table>
</td>
</tr>
<tr height="105">
<td align="center" valign="top" width="179" height="105"></td>
<td width="794" height="105"></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
</body>
</html>
[/php]
dann die home.php sieht wie folgt aus (aktuell)
[code=php]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Adobe GoLive" />
<title>home</title>
</head>
<body>
<div align="center">
<p><strong>Willkommen Sven ! </strong></p>
<p><strong>Hier kannst du alles Steuern ! </strong></p>
<p></p>
<p>Infos zum System </p>
<p><div align="center">
<table width="481" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php
$output = shell_exec(' gpio -g read 15');
if( $output == 1 )
echo "<p><img src='/icon/licht_off.jpg' /></p>";
else
echo "<p><img src='/icon/licht_on.jpg' /></p>";
?></td>
<td></td>
<td><?php
$output = shell_exec(' gpio -g read 8');
if( $output == 1 )
echo "<p><img src='/icon/ww_off.jpg' /></p>";
else
echo "<p><img src='/icon/ww_on.jpg' /></p>";
?></td>
<td></td>
<td><?php
$output = shell_exec(' gpio -g read 27');
if( $output == 1 )
echo "<p><img src='/icon/Solar_off.jpg' /></p>";
else
echo "<p><img src='/icon/Solar_on.jpg' /></p>";
?></td>
<td></td>
<td><?php
$output = shell_exec(' gpio -g read 17');
if( $output == 1 )
echo "<p><img src='/icon/heizung_off.jpg' /></p>";
else
echo "<p><img src='/icon/heizung_on.jpg' /></p>";
?></td>
<td></td>
<td><?php
#Mit folgender Zeile kann man die Verzeichnisse der angeschlossenen Sensoren auslesen
#Für jeden Sensor der angeschlossen wird, wird automatisch ein Unterverzeichnis erstellt
#cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
$sensors = array("Anlage"=>"28-0416a43a81ff");
foreach ($sensors as $room => $directory)
{
$temp = exec('cat /sys/bus/w1/devices/'.$directory.'/w1_slave |grep t=');
$temp = explode('t=',$temp);
$temp = $temp[1] / 1000;
$temp = round($temp,2);
$temp = number_format($temp,1,',','.');
echo "<div class=\"box\">";
echo "<div class=\"room\">".$room.":</div>\n";
echo "<div class=\"temp shadow\"> ". $temp . " C</div>\n";
echo "<div style=\"clear:both;\"></div>\n";
echo "</div>";
}
?></td>
</tr>
</table>
<br />
</div>
</p>
<p></p>
</div>
</body>
</html>[/php]
so wenn ich die home.php allein aufrufe geht diese aber sie wird nicht in der index angezeigt , bereich bleibt leer (weis)
link hänge ich auch mal mit an
link zu normalen index
link zu home.php ( die eigentlich in der index angezeigt werden müsste