Dev
搜索

Dev

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
thinkcmf 分页 sp_sql_posts_paged
发表于2016-04-05|thinkcmf
文章分页查询方法 thinkcmf的分页貌似更喜欢放到模版中处理 有一个内置函数sp_sql_posts_paged 原文地址 http://www.thinkcmf.com/document/article/id/258.html sp_sql_posts_paged($tag,$pagesize,$pagetpl) $tag规则: cid 分类id; field 需要取出的内容,默认取出所有信息;order排序方式,可根据任何取出的字段排序,默认为按发布时间排序。 field可选参数: term_id     文章分类id post_author     文章作者id,后台管理员,对应于表users里的ID; post_keywords post_date     文章发布日期 格式2014-01-01 00:00:00 post_content     文章内容 post_title     文章标题 post_excerpt     文章摘要 post_modified     文章更新日期 格式2014-01-01 00:00:00 smeta     文章扩展属性,以...
thinkcmf sp_get_term sp_get_terms获取分类信息
发表于2016-04-04|thinkcmf
sp_get_term 示例 [pcsh lang=”php” tab_size=”4” message=”” hl_lines=”” provider=”manual”] <?php $term_id=1; $term=sp_get_term($term_id ); //获取分类信息 print_r($term); //打印出分类信息 ?> [/pcsh] 返回数组说明: term_id       分类id name      分类名称 taxonomy      分类的类型,用字符串表示,article表示文章 description      分类描述 parent      分类父级id,terms表中的term_id seo_title seo_keywords seo_description list_tpl      分类列表页的模板,对应于模板目录下Portal/文件名+.html,文件名默认为list one_tpl      分类单文章页的模板,对应于模板目录下Porta...
屏蔽js弹窗的方法
发表于2016-04-04|js
在html的头部最上方改变alert的‘定义’: 如下代码: [pcsh lang=”js” tab_size=”4” message=”” hl_lines=”” provider=”manual”] <script type="text/javascript"> window.alert = function (e) { if( typeof(e) != 'undefined') { console.log(e) }else{ console.log('无提示信息') } }; </script> [/pcsh] 这样alert信息就会显示在console中了  
sublime 使用方法
发表于2016-04-03|others
安装Package Controlhttps://packagecontrol.io/installation 123456789import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener(urllib.request.build_opener( urllib.request.ProxyHandler())); by = urllib.request.urlopen('http://packagecontrol.io/' + pf.replace(' ', '%20')).read()...
php cookie 读写
发表于2016-04-02|php
读取cookie $_COOKIE[''] 写入cookie 语法 setcookie(name,value,expire,path,domain,secure) 参数 描述 name 必需。规定 cookie 的名称。 value 必需。规定 cookie 的值。 expire 可选。规定 cookie 的有效期。 path 可选。规定 cookie 的服务器路径。 domain 可选。规定 cookie 的域名。 secure 可选。规定是否通过安全的 HTTPS 连接来传输 cookie。
thinkphp page方法
发表于2016-04-01|thinkphp
$list = $Terms->page(9,2)->select(); 大致上可以这样写,就是第9页,每页2个 当第一个参数是0时,表示第一页,当超出总数时,返回empty
1…636465…102
avatar
developer
AI相伴的开发者博客
文章
1011
标签
712
分类
31
Follow Me
公告
This is my Blog
最新文章
react native 0.83 turbo modules 安卓 使用记录2026-01-10
一种适合开发的设计风格2026-01-07
使用virtualbox 记录2026-01-04
ppa launchpad镜像2025-12-29
multipass 使用记录2025-12-28
分类
  • apicloud3
  • bootstrap8
  • cocos2d-js5
  • createjs17
  • day45
  • docker16
  • egret14
  • flash2x2
标签
常用 COS 页面高度 egret 基本使用 $wpdb 拓展 禁止 mb_strcut H5 微信接口 ppt 无效 百度 getnv 微信支付 微信红包 session共享 模板字符串 thinkphp 常见问题 join 不同终端 url wordpress,plugins_url 和数组 对象 json 删除失败 poppler ci 对工作的思考 denied 中 会展行业 60 tostring 低成本 解决 我的全新开始
归档
  • 一月 2026 3
  • 十二月 2025 5
  • 十一月 2025 2
  • 十月 2025 5
  • 九月 2025 5
  • 八月 2025 2
  • 七月 2025 1
  • 五月 2025 1
网站信息
文章数目 :
1011
本站访客数 :
本站总浏览量 :
最后更新时间 :
© 2025 - 2026 By developer框架 Hexo 8.1.1|主题 Butterfly 5.5.4
搜索
数据加载中