moin mädels,
auf der suche nach was gaaanz einfachem für faq habe ich ein winziges script gefunden - ziemlich alt - benötigt php3
die ganze sache besteht aus 3 dateien
der index.php (dort soll die faq-datei includiert werden und zwei weitere befehle um head und content zu zeigen) - dem admin-bereich (der geht) und der eigentlichen faq.php
der adminbereich funzt
aber die index.php hagelt fehlermeldungen, von denen ich nicht weiß, ob möglicherweise das script einfach zu alt ist oder ist zu dumm
das ist die faq-datei
Code:
<?php
/**************************************
EasyFAQ Alpha 1.0 vom 10.8.2001
Copyright by Andreas Geißner
Weiteres siehe Readme.txt
**************************************/
#Config
$path = "/home/www/m-zweig/faq/data/"; #Absoluter Pfad zum Verzeichnis data (muss so heißen) zum Abspeichern der FAQs, am Ende ein /
#Ende config
function showheader($faq)
{
global $path;
$inhalt = implode("", file("$path$faq.dat"));
$details = explode("|||", $inhalt);
echo "<table width=\"300\" border=\"0\">";
for($count = "0"; $details[$count]; $count = $count +2)
{
for($zahl = "0"; $zahl < "2"; $zahl = $zahl +2)
{
echo "<tr><td><a href=\"#FAQ" . $faq . "Antw$count\">$details[$count]</a></td></tr>";
}
}
echo "</table>";
}
function showfaq($faq)
{
global $path;
$inhalt = implode("", file("$path$faq.dat"));
$details = explode("|||", $inhalt);
echo "<table width=\"300\" border=\"0\">";
for($count = "0"; $details[$count]; $count++)
{
echo "<tr><td><a name=\"FAQ" . $faq ."Antw$count\">$details[$count]</a></td></tr>\n";
$count++;
echo "<tr><td>$details[$count]</td></tr><tr><td> </td></tr>\n";
}
echo "</table>\n<br>";
echo "Benutzter Script: <a href=http://php4-coder.de target=_blank>EasyFAQ von PHP4-Coder.de</a>";
}
und das meine index.php
Code:
<?php include("faq.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="NetObjects Fusion 10 for Windows">
<link rel="stylesheet" type="text/css" href="./html/style.css">
<link rel="stylesheet" type="text/css" href="./html/site.css">
</head>
<body style="margin: 0px;">
<table border="0" cellspacing="0" cellpadding="0" width="480">
<tr valign="top" align="left">
<td width="31" height="80"><img src="./assets/images/autogen/clearpixel.gif" width="31" height="1" border="0" alt=""></td>
<td width="449"><img src="./assets/images/autogen/clearpixel.gif" width="449" height="1" border="0" alt=""></td>
</tr>
<tr valign="top" align="left">
<td></td>
<td width="449" class="TextObject">
<?php showheader("paby"); ?>
<?php showfaq("paby"); ?> </td>
</tr>
</table>
</body>
</html>
und so schaut das ganze dann aus - heul
http://www.m-zweig.de/faq/
vielleicht sieht ja einer von euch, auf den ersten blick, wo der kram hängt
für tipps - dankbar - paby
ps. den ordner data mit einer paby.dat gibt es