public static function getFrontCache($attr_key = '') { $cache = new FileCache(); $cache_key = "tag_post"; $root_path = UtilHelper::getRootPath(); $cache->cachePath = $root_path . '/common/logs/cache'; $data = $cache[$cache_key]; $data = $data ? $data : self::buildFront(true); $data_attr = json_decode($data, true); return $attr_key ? $data_attr[$attr_key] : $data_attr; }
public function actionUeditor() { $action = $this->get("action"); $config_path = UtilHelper::getRootPath() . "/admin/web/ueditor/upload_config.json"; $config = json_decode(preg_replace("/\\/\\*[\\s\\S]+?\\*\\//", "", file_get_contents($config_path)), true); switch ($action) { case 'config': echo json_encode($config); break; /* 上传图片 */ /* 上传图片 */ case 'uploadimage': /* 上传涂鸦 */ /* 上传涂鸦 */ case 'uploadscrawl': /* 上传视频 */ /* 上传视频 */ case 'uploadvideo': /* 上传文件 */ /* 上传文件 */ case 'uploadfile': $this->uploadUeditorImage(); break; case 'listimage': $this->listUeditorImage(); break; } }