yangzailu

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

随笔分类 -  ThinkPHP

1 2 下一页

thinkphp6 模型中时间戳报错
摘要:在增加数据的时候,总是提示 SQLSTATE[HY000]: General error: 1364 Field 'create_time' doesn't have a default value 。 解决方法:在database.php 中设置取消数据类型的自动转换: 'datetime_for 阅读全文

posted @ 2022-09-27 11:42 飞离地平线 阅读(753) 评论(0) 推荐(0) 编辑

thinkphp6 linux首次部署Access denied
摘要:thinkphp6 linux首次部署Access denied 解决: 1.根目录下 chmod -R 777 2.修改php.ini 文件将cgi.fix_pathinfo的值改成1。 3.根目录下增加:.user.ini open_basedir=/home/wwwroot/hewaApi:/ 阅读全文

posted @ 2022-09-27 10:29 飞离地平线 阅读(79) 评论(0) 推荐(0) 编辑

git方式安装thinkphp5
摘要:1.thinkphp 的github 代码版本地址:https://github.com/top-think 2. 点击think 复制 地址 3. 新建thinkphp5 文件夹 git clone地址代码 4. 右击 git bash here 5. git clone --dapth=1 (c 阅读全文

posted @ 2019-03-18 15:08 飞离地平线 阅读(1456) 评论(0) 推荐(1) 编辑

TPshop各个目录模块介绍
摘要:1.各个模块介绍 史上最全 2. 3. 阅读全文

posted @ 2019-01-11 14:56 飞离地平线 阅读(566) 评论(0) 推荐(0) 编辑

tpshop linux安装下注意事项
摘要:1. 安装目录不可读写 赋予权限 2.安装环境参考 https://lnmp.org/install.html 3.wget 若没有安装 yum 安装 阅读全文

posted @ 2019-01-11 14:07 飞离地平线 阅读(873) 评论(0) 推荐(0) 编辑

ThinkPHP登录功能的实现方法
摘要:登陆功能是PHP程序设计中常见的功能。本文ThinkPHP实例主要完成注册成功后进入首页,并告诉你是登录用户的功能。具体实现步骤如下: 第一步:在config.php文件中加上: 完整实现代码如下: public function insert() { header('Content-Type:te 阅读全文

posted @ 2018-09-28 16:10 飞离地平线 阅读(626) 评论(0) 推荐(1) 编辑

thinkphp去掉url中的.html后缀
摘要: 阅读全文

posted @ 2018-05-21 13:58 飞离地平线 阅读(1090) 评论(0) 推荐(1) 编辑

ThinkPHP去除url中的index.php
摘要:http://www.onedayoneclass.com/index.php/Home/Index/getopenId.html 改为: http://www.onedayoneclass.com/Home/Index/getopenId.html htaccess文件必须放到跟目录下 这个文件里 阅读全文

posted @ 2018-04-28 16:19 飞离地平线 阅读(424) 评论(0) 推荐(0) 编辑

thinkphp链接多个数据库时怎么调用M方法?
摘要:老项目tp3.1.3,有N个数据库,thinkphp好久没用了,不知道怎么用M方法了,代码测验成功! 数据库名称: 2.直接上代码 阅读全文

posted @ 2018-04-24 17:35 飞离地平线 阅读(475) 评论(0) 推荐(0) 编辑

首次配置网站报错原因?
摘要:首次搭建自己的网站,在本地wamp服务上没有任何错误,但是同步到阿里云上就报错了,是什么原因呢? 原来,首次搭建网站要给予某些目录权限,否则权限无法运行,肯定报错的。我是把Application下的目录全部给与了777权限。 chmod -R 777 /home/wwwroot/xiaokai/Ap 阅读全文

posted @ 2018-04-17 18:31 飞离地平线 阅读(252) 评论(0) 推荐(0) 编辑

php+mysql+jquery日历签到
摘要:在网站开发过程中我们会经常用到签到功能来奖励用户积分,或者做一些其他活动。这次项目开发过程中做了日历签到,因为没有经验所有走了很多弯路,再次记录过程和步骤。 1.日历签到样式: 2.本次签到只记录本月签到数,想要查询可以写其他页面,查询所有签到记录。(功能有,非常麻烦,古没有做。) 3.前台代码 4 阅读全文

posted @ 2017-02-27 14:33 飞离地平线 阅读(921) 评论(0) 推荐(1) 编辑

thinkphp下通过页面链接传递的参数获取一次后失效
摘要:在thinkphp下通过页面链接传递的参数获取一次后失效,ajax内部无法再次使用。想要使用必须再次用js获取其值,通过ajax传递给后台使用。 1.通过页面链接传递参数给下一页 2.可以再下一页后台方法获取: 3.获取后给前台显示: 4.若ajax想要在后台修改密码时再次使用时候需要利用js再次从 阅读全文

posted @ 2017-02-21 11:02 飞离地平线 阅读(387) 评论(0) 推荐(0) 编辑

thinkphp下mysql用用户名或者手机号登录
摘要:$res=$user->where("login_id='{$username}' OR phone='{$username}'")->find(); $phone=I('param.phone'); $sql='select phone,login_id from pro_cuser where phone="'.$data['phone'].'" or login_id="'.$dat... 阅读全文

posted @ 2017-02-20 13:37 飞离地平线 阅读(298) 评论(1) 推荐(0) 编辑

thinkphp中ajax接收参数值
摘要:if(IS_AJAX) { $oldpwd=I('param.oldpwd'); } 阅读全文

posted @ 2017-02-17 10:30 飞离地平线 阅读(388) 评论(1) 推荐(0) 编辑

thinkphp下判断状态值语法
摘要:在thinkphp框架下我们经常会用到状态值的判断:但是这样写会引起语法错误。 2.正确写法:因为在thinkphp在不能使用“.”语法 f标签里面已经包含了php的解析了,如果再在里面写入{}标签解析的话,会报不符合php语法的错误。3. 阅读全文

posted @ 2017-02-17 09:32 飞离地平线 阅读(468) 评论(1) 推荐(0) 编辑

手机验证码根据用户名和手机号查询是否存在手机号码
摘要:public function CheckMobileUser($data){ $sql='select phone,username from wlzbpre_user where phone="'.$data['phone'].'" or username="'.$data['phone'].'" and status="1" limit 1'; $p... 阅读全文

posted @ 2017-02-16 10:50 飞离地平线 阅读(731) 评论(1) 推荐(0) 编辑

thinkphp引入头文件
摘要:<include File="Public:regheader" /> 阅读全文

posted @ 2017-02-15 18:44 飞离地平线 阅读(298) 评论(1) 推荐(0) 编辑

thinkphp多表联合查询
摘要:1.两个表查询 2.联合查询:联合查询需要写表的全名。 阅读全文

posted @ 2017-02-13 16:57 飞离地平线 阅读(383) 评论(1) 推荐(0) 编辑

打印thinkphp中的sql语句
摘要:var_dump($repair->fetchSql(true)->where(array('cuername' =>$cuername))->order('applytime desc')->limit($page1*$listRows,$listRows)->select()); $list=$repair->where(array('cuername'=>$cuername))->or... 阅读全文

posted @ 2017-01-23 11:39 飞离地平线 阅读(1352) 评论(3) 推荐(0) 编辑

thinkphp更新数据库的时候where('')为字符串
摘要:thinkphp更新数据库的时候where('')为字符串,要么为数组。为字符串要点连接 阅读全文

posted @ 2017-01-21 16:49 飞离地平线 阅读(278) 评论(1) 推荐(0) 编辑

1 2 下一页
点击右上角即可分享
微信分享提示