Ciao a tutti.
Qualcuno mi può aiutare?
Passando da PHP 4.2.2 a 4.3.9-1 il seguente script non funziona più
<?php
$path = "http://www.salasanluigi.it/";
$date = date("Ymd");
$month = date("mY");
$g = date('w');
switch($g) {
case 0: $day = $path.'cinema/weekend/week'.$date.'.php'; break;
case 1: $day = $path.'cinema/inglese/inglese'.$date.'.php'; break;
case 2: $day = $path.'cinema/essai/essai'.$date.'.php'; break;
case 3: $day = $path.'teatro/capodanno'.$date.'.php'; break;
case 4: $day = $path.'cultura/incontri/spazioeducazione/educazione'.$date.'.php'; break;
case 5: $day = $path.'teatro/dialettale/dialettale'.$date.'.php'; break;
case 6: $day = $path.'cinema/weekend/week'.$date.'.php'; break;
}
$esistenza = @fopen($day, "r");
if ($esistenza) {
$file=fopen("$day", "r");
$all=fread($file, 100000);
$allar=explode("",$all);
$COSO_DA_INSERIRE=$allar[1];
$linkarr=explode("",$all);
$FRASE_LINK=$linkarr[1];
print "<div id=\"titolo\"><a href=$day>$FRASE_LINK</a></div>";
print "$COSO_DA_INSERIRE\n";
fclose($file);
}
else {
$file=fopen("vuoto.php", "r");
$all=fread($file, 100000);
$allar=explode("",$all);
$COSO_DA_INSERIRE=$allar[1];
print "$COSO_DA_INSERIRE\n";
fclose($file);
}
?>
Qualcuno mi sa dire perché e come correggerlo?
Grazie