随笔分类 - thinkcmf
thinkcmf问题
摘要:首先保证模型类对应的数据库表一样 TemporaryContracts 模型对应的数据表 cmf_temporary_contracts 模型Model 在模型Model 上使用paginate方法 第一个参数是分页数量 第二个参数是选择是否使用简单模式 然后模型里 输出 查询的数据 renturn
阅读全文
摘要:前端模板变量使用函数 htmlspecialchars_decode {$v.content | htmlspecialchars_decode = ### } 前端显示 想要的效果
阅读全文
摘要:后台编辑文件路径 public\themes\admin_simpleboot3\portal\admin_article\edit.html <notempty name="post.more.files"> <foreach name="post.more.files" item="vo"> <
阅读全文
摘要:获取当前时间 date('Y-m-d H:i:s')$currenttime =date('Y-m-d H:i:s');/*转换成时间戳*/$addtime =strtotime($currenttime);dump($addtime);/*时间戳转日期*/$time = date('Y-m-d H
阅读全文
摘要:thinkcmf表单上传 前端html代码form提交 1)二进制数据上传必须加enctype='mulitipart/form-data' 2)指定method方法 post get 3)input 文件上传 type='file' 必须有name属性名才会提交 实例 <form action='
阅读全文
摘要:正常可以使用volist 的数据 一般前台接受到的数据都是这样的 volist能解析的数组是这样的 都是在一个数组里面放上数组 解决办法: 新建空的数组并把接受到的数据压到空数组里 array_push('需要使用的数组','需要压到数组里的数据') $r = $this->request->par
阅读全文
摘要:thinkcmf框架想引用vue框架,不想每次页面都写, 想法就是想要放的文件都放在一个文件里,这样都直接导入文件就可以使用了 因为在后台开发,所以是在后台模板下面的弄,下面的是路径,参考路径:public\themes\admin_simpleboot3\common\vue\vue.html 新
阅读全文
摘要:thinkcmf 忘记密码 或者 密码错误 如何修改后台登陆密码? 直接在后台登陆控制器里输入 dump(cmf_password('123456')); 参考文件路径 app\admin\controller\PublicController.php 访问后台登陆 使用cmf_password函数
阅读全文
摘要:THINKCMF 自定义扩展函数 phpstorm里全局搜索下 ctrl + alt + f 搜索 extra_file_list 然后跳转到 app\config.php 文件里 这里是thinkcmf定义扩展函数文件的位置 thinkphp5定义的位置在 simplewind\thinkphp\
阅读全文
摘要:下面情况是单独的一个数据添加 1.$adminname[0];保证是一个数组 2.需要把user_login替换成adduser,顺序是替换的键名在前面(标红) 3.修改完别忘记注销 unset以前的键名 $namearray =$adminname[0]; $namearray['adduser'
阅读全文
摘要:后台控制器位置 \app\portal\controller\AdminPageController.php editPost() 后台模板 \public\themes\admin_simpleboot3\portal\admin_page\edit.html 提交数据方式 <input type
阅读全文
摘要:控制器修改 D:\cmf\thinkcmf\app\admin\controller\PublicController.php 注释 /* $captcha = $this->request->param('captcha'); if (empty($captcha)) { $this->error
阅读全文