[PHP & MySQL] include als variable?

Black Katrin
Hallo,

Ist es möglich das "include("inhalt.php"); als eine variable abzuspeichern? also eigentlich die dateien... weil ich würde gerne die textseiten durch eine funktion laufen lassen, und da brauch ich den text ja als variable... oder habt ihr ne andere idee?

index.php
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<?php
$header rand(1,4);

include("config.inc.php");
$verbindung=mysql_connect($dbhost,$dbuser,$dbpasswd);

?>

<html>
<head>
<title>Cho Taekwondo Schule Nunningen</title>
<link href="style/style.css" rel="stylesheet">

<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="keywords" content=" ">
<meta name="content-language" content="de">
</head>

<body>

<table class='design' align='center'>
 <tr>
  <td colspan='3' height='200'><img src='style/header<?php echo $header?>.jpg'></td>
 </tr>
 <tr>
  <td width='140' valign='top'><?php include("menu.php"); ?></td>
  <td width='10'>&nbsp;</td>
  <td width='650' valign='top'><?php include("datein.php"); include("inhalt.php"); ?></td>
 </tr>
</table>

</body>
</html>


inhalt.php
php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
<?php

if(isset($_GET['section']) AND isset($dateien[$_GET['section']]))
{
include $dateien[$_GET['section']];
}
else
{
include $dateien['start'];
}
?>
Oli
Hi,

wenn das wirklich nur Text ist, mach doch einfach
php:
1:
$inhalt=file_get_contents($datei);



LG
Black Katrin
danke... bis auf gästebuch und album wird das gehen Augenzwinkern muss ich eben noch ne abfrage reinwürgen... aber so gehts dafür wenigstens Freude