Der kommer bare en blank side hvis jeg skifter echoen ud med eval. Stringen kunne ex. se sådan her ud
<html>
<head>
<title>test</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
{{content}} (bliver byttet ud med indholdet af siden)
<div class="footer">
<? include('footer.php'); ?>
</div>
</body>
<html>
Her er koden der skal hente og vise siden
<?
include('admin/config.inc.php');
include('admin/connect.php');
$page = $_GET['page'];
$query = mysql_query("SELECT * FROM mysite_pages WHERE title = '$page'");
while ($row = mysql_fetch_array($query))
{
$content = $row['content'];
$template = $row['template'];
}
$template = "admin/templates/".$template."/template.php";
$output = file_get_contents($template);
$output = str_replace("{{content}}", $content, $output);
eval($output);
?>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GED d- s: a--- C++ U? P L+ E? W++ N? o? K- w
O? M? V? PS PE? Y? PGP++ t 5? X+ R tv+ b+ DI? D+
G e-- h! !r y--
------END GEEK CODE BLOCK------
[Redigeret d. 16/11-05 20:31:37 af Jonas (Decko)]