drci47425 2014-07-25 08:05 采纳率: 100%
浏览 24

将项目上传到站点后,无法在fiverr脚本中解析错误成员函数getrows()

I have uploaded fiverr script on my server and uploaded databases there, after installation the site runs good. after i have uploaded a project to it i am getting this error continuously on the index page.

Here is the url: http://jobbyu.com/

this is the error which i am getting.

Warning: Division by zero in /home/xxx/public_html/index.php on line 116

Fatal error: Call to a member function getrows() on a non-object in /home/xxx/public_html/index.php on line 126

this is the code of index.php

106   if ($abc > 0)
107  {
108     if($executequery1->fields['total']<=$config[maximum_results])
109     {
110         $total = $executequery1->fields['total'];
111     }
112     else
113      {
114         $total = $config[maximum_results];
115      }
116     $toppage = ceil($total/$config['items_per_page_new']);
117     if($toppage==0)
118     {
119         $xpage=$toppage+1;
120     }
121     else
122     {
123         $xpage = $toppage;
124     }
125     $executequery2 = $conn->Execute($query2);
126     $posts = $executequery2->getrows();
127     $beginning=$pagingstart+1;
128     $ending=$pagingstart+$executequery2->recordcount();
129     $pagelinks="";
130     $k=1;
131     $theprevpage=$currentpage-1;
132     $thenextpage=$currentpage+1;

thanks for replying

  • 写回答

1条回答 默认 最新

  • dtj88302 2018-03-30 20:05
    关注

    Can you check your config file, probably your variable $config['items_per_page_new'] it's 0 so the calculus will be total_pages_value divided by 0 which throw an error.

    PS: The url doesn't work anymore.

    评论

报告相同问题?

悬赏问题

  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)