hi !
sorry, this problem is soluted... But i have a new question :-), and i would be very happy, if somebody would help me. does somebody know, how to edit the following script, that the archive writes the links in actuality-line. I mean, that the newest one is the first in the archive and the oldest one is the last. [Upload date and time, or time of creation] Can sb help me, please?
here is the script:
<?
$verzeichnis = dir(".");
$endung = ".htm";
while($datei = $verzeichnis->read()) {
if(substr($datei,strlen($endung)(-1)) == $endung)
{
$fp = fopen($datei,"r");
while (!feof($fp)) {
$linie = fgets($fp, 1024);
if(eregi("<title>(.)</title>", $linie, $title))
break;
}
echo "<A HREF=\"$datei\">$title[1]</A> <BR> ";
fclose($fp);
}
}
$verzeichnis->close();
?>
THANKS,
Chris
Chris wrote:
hi,
following is an archive-script. I am very unhappy, that everytime I load it, there is one link missing [I have 7 .htm-files in my dir, but it only shows 6 ones]. Have I done something wrong? Here is the script:
<?
$verzeichnis = dir(".");
$endung = ".htm";
while($datei = $verzeichnis->read()) {
if(substr($datei,strlen($endung)(-1)) == $endung)
{
$fp = fopen($datei,"r");
while (!feof($fp)) {
$linie = fgets($fp, 1024);
if(eregi("<title>(.)</title>", $linie, $title))
break;
}
echo "<A HREF=\"$datei\">$title[1]</A> ";
fclose($fp);
}
}
$verzeichnis->close();
?>
Thanks !
Chris