... es handelt sich um einen zufallsgenerator, der eine zufällige zeile in einer textdatei ausgibt ... beim laden der seite kommt es in unregelmäßigen abständen (bei unterschiedlichen zeilen) zu folgender fehlermeldung:
Notice: Undefined offset: 171 in /usr/blabla/quot.php on line 22 Notice: Undefined offset: 1 in /usr/blabla/quot.php on line 23
die betreffende php-datei ist:
<?php
/*
comments
comments
comments
comments
comments
comments
comments
comments
comments
comments
comments
comments
comments
comments
*/
$dat = file ("quot.dat");
$anz = count ($dat);
mt_srand((double)microtime()*1000000);
$z_zahl = mt_rand(1, $anz);
$ausg = explode ("|", $dat[$z_zahl]);
echo $ausg[1];
?>
eine beispielzeile der "quot.dat" lautet:
23|bla text bla ...
weiß jemand, wo der fehler liegt?
mfg
Gunnar

Hilfe
Neues Thema
Antworten


Nach oben

