文章分类 -  thinkphp

摘要:案例描述: 我在appliction/index/ 也就是index模块中建立一个vv文件夹放入Test.php类文件 并且试着在 index/controller/index 也就是index控制器中建立function lx() 方法想在这个方法中导入Test类 【一】类库映射操作: 1、在应用 阅读全文
posted @ 2017-11-16 16:18 蓝魔 阅读(551) 评论(0) 推荐(0)
摘要:private function categoryTree($parentid,$level) //因为是本类中使用所以定于为私有函数{$Category= D('Category');$result = $Category->where("`parentid`=".$parentid)->order("listorder desc,catid desc")->select();if($result){$count=count($result);//当前子栏目个数$level++;//子栏目层级foreach($resu 阅读全文
posted @ 2013-12-30 22:43 蓝魔 阅读(228) 评论(0) 推荐(0)
摘要:文件路径:aoli/admin/Lib/Action/IndexAction.class.phpdisplay(); } public function top(){ $this->display(); } public function left(){ $this->display(); } public function right(){ $this->display(); } }?>文件路径:aoli/admin/Tpl/default/Indexindex.html top.htmlleft.htmlright.html注意事项:调用top.html,left. 阅读全文
posted @ 2013-10-15 08:36 蓝魔 阅读(119) 评论(0) 推荐(0)
摘要:假设你的栏目表名为think_class, 表有字段: id,name,parentid, 参考代码:$class=M("Class");$data=$class->select();$list=array();foreach($data as $arr){$list[$arr['parentid']][]=$arr;//重新整理数据排序。}$this->assign("list",$list);复制代码然后在模版中:大分类:{$vo.name}所属小分类: {$vo2.name} 阅读全文
posted @ 2013-09-10 20:47 蓝魔 阅读(191) 评论(0) 推荐(0)
摘要:使用时发生错误最可能的原因: 1、入口文件中启用了debug调试 2、文件写入时有BOM头没有去除 3、上传空间后在调用验证码前加入 ob_clean();(清理缓存)函数,否则可能无法正常显示验证码://导入验证码类,在aoli\ThinkPHP\Lib\ORG\Util\Image.class.php里有验证码方法 英文验证码:buildImageVerify($length,$mode,$type,$width,$height,$verifyName)length :验证码的长度,默认为 4 位数 mode :验证字符串的类型,默认为数字,其他支持类型有 0 字母 1 数字 2 ... 阅读全文
posted @ 2012-12-04 00:16 蓝魔 阅读(268) 评论(0) 推荐(0)
摘要:应用步骤: 1、下载FCKeditor2.x版本,将解压后的文件夹FCKeditor复制到ThinkPHP文件夹下的Vendor目录下,以便符合THinkPHP的第三方类库引入规则。 2、修改参数: 首先,用EditPlus等软件打开FCKeditor目录下的fckeditor_php5.php文件,找到第130行。出现内容如下: 复制代码 代码如下:public function __construct( $instanceName ) {$this->InstanceName = $instanceName ; $this->BasePath= ' ' ; $t 阅读全文
posted @ 2012-11-28 23:28 蓝魔 阅读(372) 评论(0) 推荐(0)