具体如下:
html:
ClearCache
js:
function clearCache() { $.get('../eng/index.php?r=site/clear&'+new Date().getTime(),function(){ alert('Clear eng cache ok.'); }); }
php:
public function actionClear() { Yii::app()->cache->flush(); }
上一篇:使用joomla怎么对数据库进行操作
下一篇:怎么在yii中利用model添加默认值