的财产,我使用Yii PHP框架和memcache缓存,当我打开没有缓存的页面,第一次我看到这个错误:Yii的高速缓存错误:试图让非对象
现场错误错误注销(Linux版):
Fatal error: Call to a member function getColumnNames() on a non-object in /home/cineshell/cineklik/framework/db/ar/CActiveFinder.php on line 385
,错误日志本地(窗口):
Trying to get property of non-object
C:\xampp\htdocs\appfolder\framework\yiilite.php(7125)
...
7123 public function getTableSchema()
7124 {
7125 return $this->getMetaData()->tableSchema;
7126 }
配置/主:
'cache'=> array(
'class'=> 'CMemCache',
'servers'=>array(
array('host'=>'localhost', 'port'=>11211, 'weight'=>100),
),
),
缓存例如:
$data = Yii::app()->cache->get('casheID' );
if($data===false)
{
$data = dataprovider, query... etc
}
echo $data;
所以,这里有什么错误,并且可能是一些在服务器设置?
有人告诉我使用if isset
但我不明白!
你在缓存什么? –
@Aktiiv dataprovider,查询.. – Abudayah