Dev
搜索

Dev

thinkcmf 使用第三方 类库
发表于2016-04-11|thinkcmf
放在simplewind/Core/Library/Vendor中的类库 1,加入命名空间 namespace Vendor; 实例化时 new \Vendor\Page($count, $pagesize); 即可
php curl 常用选项
发表于2016-04-11|php
[pcsh lang=”php” tab_size=”4” message=”” hl_lines=”” provider=”manual”] // 启动 $ch = curl_init(); // 链接 curl_setopt($ch, CURLOPT_URL, $url); // 成功返回结果,失败返回false curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) ; // 返回原生输出 curl_setopt($ch, CURLOPT_BINARYTRANSFER, true) ; // 超时设定 curl_setopt($ch, CURLOPT_TIMEOUT , 30) ; // http代理 curl_setopt($ch, CURLOPT_PROXY, $proxy); // 执行 $output = curl_exec($ch); [/pcsh]    
thinkphp 加载第三方类库
发表于2016-04-10|thinkphp
除了官方的位置 可以用官方函数去实例化 http://document.thinkphp.cn/manual_3_2.html#lib_extend http://document.thinkphp.cn/manual_3_2.html#autoload 其实借助命名空间任何位置都可以的 写好namespace和use就好了 其中, 给第三方类加namespace,就是他的路径,不包括文件名 给需要加载这个类的文件加use,就是他的路径+文件名,文件名和类名同名 这样就可以自动找到这个类啦,使用namespace和use的写法还能在一定程度上降低io  
thinkcmf 几个重要基类
发表于2016-04-07|thinkcmf
AppframeController     —– ThinkCMF框架控件器基类,继承至Controller AdminbaseController   —– ThinkCMF框架后台控件器基类,继承至AppframeController HomebaseController     —– ThinkCMF框架前台控件器基类,继承至AppframeController MemberbaseController —– ThinkCMF框架会员控件器基类,继承至HomebaseController AdminbaseController,找到后台模版,未登录防护HomebaseController,找到前台模版 成员函数:check_login 检查用户登录,未登录error函数报错MemberbaseController,_initialize方法中有检测登录用户登录,并把用户信息放到了user 对象中  
thinkphp mysql 查询 排除字段
发表于2016-04-07|thinkphp
field(‘content’,true) 就会排除content字段
thinkcmf 文章内页
发表于2016-04-07|thinkcmf
内页有很多变量都是可以直接用的 $post_source 文章来源 $post_title 文章题目
thinkcmf sp_sql_post 获取单篇文章信息
发表于2016-04-07|thinkcmf
原文地址: http://www.thinkcmf.com/document/article/id/232.html sp_sql_posts($tag,$where) 功能: 查询文章列表,不做分页 参数: $tag:查询语句(见$tag规则) $where:查询条件,(暂只支持数组),格式和thinkphp where方法一样; 返回信息如下: [pcsh lang=”php” tab_size=”4” message=”” hl_lines=”” provider=”manual”] Array ( [tid] => 3 [object_id] => 3 [term_id] => 1 [listorder] => 0 [status] => 1 [id] =>...
thinkcmf 表单 方法
发表于2016-04-07|thinkcmf
\application\Portal\Controller\AdminPostController.class.php add_post 接收后台post过来的数据,并增加一个文章,其接收的 $_POST[‘smeta’] 是拓展字段 edit 显示后台的编辑文章的iframe
register_shutdown_function php 函数
发表于2016-04-07|php
php脚本即将死掉时会调用这个函数,来调用一个函数用以处理最后的事务
thinkcmf 后台 插件管理 插件方法无法注册 无法显示 的解决方法
发表于2016-04-06|thinkcmf
未做更完整的测试 按以下方法一定可以解决 一定要在hooks.php和hooks.html中都写上这个钩子,否则是不会注册的 而且我实际开发过程发现,这两个貌似都必须同时存在才有效 原文地址: http://www.thinkcmf.com/topic/topic/index/id/399.html
1…636465…102
avatar
developer
AI相伴的开发者博客
文章
1017
标签
717
分类
33
Follow Me
公告
This is my Blog
最新文章
flutter getx使用记录2026-03-01
统计代码行数2026-02-27
php easywechat 6.x 微信支付 手动解密2026-02-25
php 反引号 执行shell脚本2026-02-25
mysql使用记录2026-02-19
分类
  • apicloud3
  • bootstrap8
  • cocos2d-js5
  • createjs17
  • day45
  • docker16
  • egret14
  • flash2x2
标签
接口 $wpdb js动画 微信分享定制注意事项 类型转换 issuer python环境 specified 删除失败 unable 会展行业 并携带cookie __call 手机抓包 汉字说明 读取 api go 备案 serverless 编译 协程 ts 转发 tp5 nfs 开发 查看 自建vpn Supervisor user 乱码 file event vscode Post Formats Anaconda 笔试题 display family
归档
  • 三月 2026 1
  • 二月 2026 5
  • 一月 2026 3
  • 十二月 2025 5
  • 十一月 2025 2
  • 十月 2025 5
  • 九月 2025 5
  • 八月 2025 2
网站信息
文章数目 :
1017
最后更新时间 :
© 2025 - 2026 By developer框架 Hexo 8.1.1|主题 Butterfly 5.5.4
搜索
数据加载中