codecamp

常量参考

框架与定义常量如下:

常量声明必须全部大写以下划线分割

框架内置常量目前共有17个,包含可二次定义常量7个

当访问URLhttp://127.0.0.1/Idea-framework/index.php?m=home&c=Index&a=index时,各常量值如下表所示:

常量说明权限演示
FRAMEWORK_VERSION框架版本不可改V1.0
ROOT_PATH网站根路径可改D:/php/www/Idea-framework/
APP_NAME应用目录名可改application
APP_PATH应用路径可改D:/php/www/Idea-framework/application/
FRAMEWORK_NAME框架版本目录名可改system
FRAMEWORK_PATH框架路径可改D:/php/www/Idea-framework/system/
EXTEND_PATH应用扩展路径可改D:/php/www/Idea-framework/application/extend/
CONFIG_FILE配置文件可改D:/php/www/Idea-framework/application/config/Config.php
ENTRANCE入口文件名不可改index.php
MODULE当前(模块、平台、分组)名不可改home
CONTROLLER当前控制器名不可改Index
ACTION当前当前操作方法名不可改index
__ROOT__网站根URL路径不可改http://127.0.0.1/Idea-framework/index.php
__APP__当前页面应用URL路径不可改http://127.0.0.1/Idea-framework/application
__MODULE__当前页面模块URL路径不可改http://127.0.0.1/Idea-framework/index.php?m=home
__CONTROLLER__当前页面控制器URL路径不可改http://127.0.0.1/Idea-framework/index.php?m=home&c=Index
__ACTION__当前页面操作URL路径不可改http://127.0.0.1/Idea-framework/index.php?m=home&c=Index&a=index
Composer
辅助函数
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

控制器

附录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }