У меня ошибка в моем сценарии php. Это говорит "Undefined смещение: 5" и "Undefined смещение: 6" в строке 7.Неопределенное смещение: 5-6
class mooninfo{
private function moon($second, $minute, $hour, $month, $day, $year){
$lineinfo = @exec("perl ./cgi-bin/moon2.pl second=".$second." minute=".$minute." hour=".$hour." month=".$month." day=".$day." year=".$year);
$arrayinfo = explode("|", $lineinfo);
$arrayas = array("distance" => $arrayinfo[0], "AgeOfMoon" => $arrayinfo[1], "K" => $arrayinfo[2], "nameimg" => $arrayinfo[3], "phaseDesc" => $arrayinfo[4], "moonPhase" => $arrayinfo[5], "phaseTime" => $arrayinfo[6]); //It's happening here
return $arrayas;
}
public function info(){
return "Info of class mooninfo";
}
public function getmoon($second, $minute, $hour, $month, $day, $year){
return $this->moon($second, $minute, $hour, $month, $day, $year);
//return $this->moon2();
}
}
Я определяющий его как этот
<?=$arrayinfo["phaseTime"]?>
это означает, что нет $ arrayinfo [5] или выше – Santy
Где вы определяете '$ arrayinfo'? – Krease
еще лучше, проблема, вероятно, в коде для 'cgi-bin/moon2.pl' – bgarcia