search

Home  >  Q&A  >  body text

After paging, the first page can be displayed, but an error is reported on the second page.

[8] ErrorException in Pay.php line 216

未定义数组索引: data

$data = Request::get();

$one=date('Ymd', strtotime($data['data']));

 $two=date('Ymd', strtotime($data['dataonly']));

$res=Db::table('hypost')->where('time_end','like',['%'.$one.'%','%'.$two.'%'],'OR')                        ->where('shop',$shopname)   ->paginate(10);

   $this->assign('res',$res);     

<input type="hidden" value="{$j=0}" /> 

{volist name='res' id='see'}

   <tr> 

        <td>{$j}</td> 

       <td>{$see.shop}</td> 

        <td>{$see.tradeno}</td> 

<td>{$see.fee}元</td> 

        <td>{$see.code}</td> 

        <td>{$see.result}</td> 

<td>{$see.time_end}</td> 

    </tr> 

<input type="hidden" value="{$j }" />

{/volist}

  </table>

</div>

{$res|raw}


梁恒祥梁恒祥2343 days ago1277

reply all(2)I'll reply

  • 无忌哥哥

    无忌哥哥2018-07-04 11:46:18

    Find $data at line 216 and see where this $data comes from

    reply
    0
  • 梁恒祥

    Thank you for solving it. I don’t know why. The code written by the teacher cannot be executed.

    梁恒祥 · 2018-07-06 09:00:26
  • Cancelreply