我得到這個錯誤在"$hourtominute = date('H',strtotime($qData\[0\]\['totaltime'\]))*60;"
,它不會告訴我哪裏出錯。它只是標記。你能幫我麼。如果我沒有理解它,請讓我知道,所以我可以更確切地說。該代碼已經工作了4年,直到上個月。不能明白爲什麼它給了我這個錯誤。 我確實發佈了一張圖片。這個PHP是推動我瘋了
<?php
$model = Passivatelog::model();
if(!empty($myValue)) {
//var_dump($myValue);
$oPsv = Passivatelog::model();
$oPsvRep = PassivatelogReport::model();
$aReport = $oPsvRep->getReportByMachineId($myValue['report_machine']);
$operator = $aReport['report_operator'];
$machine = $aReport['report_machine'];
$date = $aReport['report_date'];
$aGroupedSteps = $model->getAllSteps();
?>
<div class="col-lg-6">
<table class="table table-bordered">
<tr>
<th>Operator:</th>
<th>Maskinnummer:</th>
<th>Datum:</th>
</tr>
<tr>
<td><?php echo $operator;?></td>
<td><?php echo $machine;?></td>
<td><?php echo $date; ?></td>
</tr>
</table>
</div>
<div class="col-lg-12">
<table class="table table-striped">
<thead>
<tr><th></th><th colspan="2">Temperatur</th><th colspan="2">PH Värde</th><th>Konduktivitet</th><th colspan="3">Tid</th></tr>
<tr><th>Process</th><th>Start</th><th>Stop</th><th>Startvärde</th><th>Diff In/Ut</th><th>Medel</th><th>Start</th><th>Stop</th><th>Totaltid minuter</th></tr>
</thead>
<?php
foreach($aGroupedSteps as $gstep) {
$qData = $oPsv->getAllData($gstep->log_processname, $aReport['report_date'], $aReport['report_from'], $aReport['report_to']);
$hourtominute = date('H',strtotime($qData[0]['totaltime']))*60;
$minutetominute = date('i',strtotime($qData[0]['totaltime']));
$totaltime = $hourtominute+$minutetominute;
echo '
<tr>
<td>' . $gstep->log_processname . '</td>
<td>'.$qData[0]['starttemp'].'</td>
<td>'.$qData[0]['endtemp'].'</td>
<td>'.(($qData[0]['startph']>0)? $qData[0]['startph']:'').'</td>
<td>'.(($qData[0]['diffph']>0) ? number_format($qData[0]['diffph'],2) : '').'</td>
<td>'.(($qData[0]['conductivity']>0)? number_format($qData[0]['conductivity'],0) : '').'</td>
<td>'.$qData[0]['starttime'].'</td>
<td>'.$qData[0]['endtime'].'</td>
<td>'.$totaltime.'</td>
</tr>';
}
?>
<tfoot></tfoot>
</table>
</div>
<div class="clearfix"></div>
<?php
} else {
$oPsv = Passivatelog::model();
$oPsvRep = PassivatelogReport::model();
$aReport = $oPsvRep->getLatestReport();
var_dump($aReport);
$operator = $aReport['report_operator'];
$machine = $aReport['report_machine'];
$date = $aReport['report_date'];
$aGroupedSteps = $model->getAllSteps();
if(!empty($aGroupedSteps) && !empty($aReport)) {
?>
<div class="col-lg-6">
<table class="table table-bordered">
<tr>
<th>Operatör:</th>
<th>Maskinnummer:</th>
<th>Datum:</th>
</tr>
<tr>
<td><?php echo $operator;?></td>
<td><?php echo $machine;?></td>
<td><?php echo $date; ?></td>
</tr>
</table>
</div>
<div class="col-lg-12">
<table class="table table-striped">
<thead>
<tr><th></th><th colspan="2">Temperatur</th><th colspan="2">PH Värde</th><th>Konduktivitet</th><th colspan="3">Tid</th></tr>
<tr><th>Process</th><th>Start</th><th>Stop</th><th>Startvärde</th><th>Diff In/Ut</th><th>Medel</th><th>Start</th><th>Stop</th><th>Totaltid minuter</th></tr>
</thead>
<tbody>
<?php
foreach($aGroupedSteps as $gstep) {
$qData = $oPsv->getAllData($gstep->log_processname, $aReport['report_date'], $aReport['report_from'], $aReport['report_to']);
$hourtominute = date('H',strtotime($qData[0]['totaltime']))*60;
$minutetominute = date('i',strtotime($qData[0]['totaltime']));
$totaltime = $hourtominute+$minutetominute;
echo '
<tr>
<td>' . $gstep->log_processname . '</td>
<td>'.$qData[0]['starttemp'].'</td>
<td>'.$qData[0]['endtemp'].'</td>
<td>'.(($qData[0]['startph']>0)? $qData[0]['startph']:'').'</td>
<td>'.(($qData[0]['diffph']>0) ? number_format($qData[0]['diffph'],2) : '').'</td>
<td>'.(($qData[0]['conductivity']>0)? number_format($qData[0]['conductivity'],0) : '').'</td>
<td>'.$qData[0]['starttime'].'</td>
<td>'.$qData[0]['endtime'].'</td>
<td>'.$totaltime.'</td>
</tr>';
}
?>
<tbody>
<tfoot></tfoot>
</table>
</div>
<div class="clearfix"></div>
<?php
}
}
什麼是實際的錯誤信息? –
如果你把'模具(後續代碼var_dump($ Q數據[0] [ 'TOTALTIME']))'之前該行發生了什麼。 – castis
不說,那是什麼讓我瘋了笑 – arre