JvM: Content Management System

Beitrag lesen

Hallo,

Ich habe mit einem sehr kleinem CMS-System begonnen, funktioniert aber nicht. Es gibt immer folgende Fehlermeldung:
Warning: fopen("daten/menue.php","r") - No such file or directory in /html/julian/tests/cms/1_index.php on line 4

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 6

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 7

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 8

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 10

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 8

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 10

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 8

Warning: Supplied argument is not a valid File-Handle resource in /html/julian/tests/cms/1_index.php on line 10

usw. Hier mein Programmcode:

<html>
<head>
<?php
 $datei0 = fopen("daten/menue.php","r");

$hp_name = fgets($datei0,100);
 $hp_webmaster_email = fgets($datei0,100);
 while (!feof($datei0))
 {
  $metas = $metas . fgets($datei0,100);
 }
 fclose ($datei0);

echo "<title>$hp_name</title>";
 echo $metas;

$stylesheet_id = "1";
 $stylesheet_pfad = "$id_index.php";
 $stylesheet_uebergabe = "$pfad?inhalt=";

$inhalt = "inhalt/$inhalt";
?>
</head>

<body bgcolor="#000000" text="#00CCFF" link="#00FFFF" vlink="#00FFFF" alink="#00FFFF">
<table width="700" border="0">
  <tr>
    <td>mittel (Logo, Stylesheetwahl)</td>
  </tr>
</table><br>
<table width="700" border="0">
  <tr>
    <td width="180"><?php
     $datei1 = fopen("daten/menue.dat","r");
     while (!feof($datei1))
     {
      $zeile1 = fgets($datei1,100);
      $zeile2 = fgets($datei1,100);
      if ($zeile2=="ueberschrift")
       echo "<b>$zeile1</b>";
      else
       echo "<a href='$stylesheet_uebergabe$zeile2'>$zeile1</a>";
     }
     fclose ($datei1);
    ?></td>
    <td width="340"><?php
     $datei2 = fopen($inhalt,"r");
     if (!$datei2)
      $inhalt = "inhalt/fehler404.inh";
     fclose($datei2);

$datei3 = fopen($inhalt,"r");
     $zeile1 = fgets($datei3,100);
     if ($zeile1=="//php")
      include($inhalt);
     else
      readfile($inhalt);
     fclose($datei3);
    ?></td>
    <td width="180">mittel (login, suche, counter)</td>
  </tr>
</table><br>
<table width="700" border="0">
  <tr>
    <td>einfach (werbung, made by)</td>
  </tr>
</table>
</body>
</html>

JvM