$this->app['id']值获取不到,求解?
在init.php的index方法中$versionUpgrade= $this->getversionUpgrade($this->app['id']);的$this->app['id']值获取不到,求解?
在init.php的index方法中$versionUpgrade= $this->getversionUpgrade($this->app['id']);的$this->app['id']值获取不到,求解?
2017-03-19
$this->app['id']值 来源common.php getApp()方法,建议在该方法 $connect = Db::getInstance()->connect(); 前面加入var_dump($sql);die(); 断点打印一下 sql语句,复制到mysql中运行。测试是否得到数据。
public function getApp($id) { $sql = "select * from `app` where id = " . $id ." and status = 1 limit 1"; var_dump($sql);die(); $connect = Db::getInstance()->connect(); $result = mysql_query($sql, $connect); return mysql_fetch_assoc($result); }
举报