256 篇
ThinkPHP5.1
thinkphp5.1接收不到参数
taotaoit 0 0
510 0 2023-06-19 ThinkPHP5.1
thinkphp5.1接收不到参数, 在一个服务器上挺好的,换了个服务器,接收不到参数articleId了。 http://abc.com/home/news/new_details.html?articleId=1064 打印是null 查看了伪静态 之前是 <IfModule mod_rewr...
TP5请求param变量
taotaoit 0 0
493 0 2023-06-16 ThinkPHP5.1
PARAM变量是框架提供的用于自动识别GET、POST或者PUT请求的一种变量获取方式,是系统推荐的获取请求参数的方法,用法如下: // 获取当前请求的name变量 Request::instance()->param('name'); // 获取当前请求的所有变量(经过过滤) Request::instance()->...
mysql查询某一字段为varchar类型内容是字母和数字,根据数字排序拼接
taotaoit 0 0
553 0 2023-05-24 ThinkPHP5.1
mysql查询某一字段为varchar类型内容是字母和数字,根据数字排序拼接 字母排在前面,数字按小到大排后面 thinkphp代码 $ApplyModel = new ApplyModel(); $where = []; $goodsList = $ApplyModel ->alias('a')...
thinkphp5生成随机验证码,自定义法方法
taotaoit 0 0
714 0 2023-04-26 ThinkPHP5.1
代码 <?php namespace app\api\controller; use think\Controller; /** * 微信小程序接口 */ class Base extends Controller { public $seKey = '.com'; // 验证码加密密钥 // publi...
tp5 配置阿里云短信
taotaoit 0 0
645 0 2023-04-24 ThinkPHP5.1
composer require alibabacloud/dysmsapi-20170525 2.0.20 tp5 用composer安装阿里云短信扩展包,不要安装2.0.23,会错误 新建文件application\common\model\Sms.php <?php namespace app\common\...
thinkphp5查询时间字段为时间戳,转换为日期格式
taotaoit 0 0
833 0 2023-04-20 ThinkPHP5.1
thinkphp5查询时间字段为时间戳,转换为日期格式 如:查询的时间字段createTime为时间戳,显示的时候需要用日期2022-02-02 sql语句怎么写? $list = Db::table("statistics.s_income")->alias("a") ->...
thinkphp5 sql语句field中concat拼接查询字段
taotaoit 0 0
732 0 2023-04-14 ThinkPHP5.1
thinkphp5 sql语句中concat拼接查询字段 拼接查询字段一 $batch = $BatchModel ->alias('a') ->leftJoin("school b", "a.schoolId = b.id") ->l...
thinkphp5 tcpdf导出pdf乱码,关闭调试模式就好了
web 0 0
746 0 2023-02-08 ThinkPHP5.1
thinkphp5 tcpdf导出pdf乱码,如图 关闭tp5调试模式,就可以了 1.透过Composer浏览正式版TCPDF,转换到业务流程子目录运转如下表所示指示(Windows下DOS指示转换): composer require tecnickcom/tcpdf 指示获得成功继续执行后,TCP...
tp5按月统计金额,并显示该月的支付状态(如果该月有1条未支付信息,则该月显示未支付)
taotaoit 0 0
666 0 2023-01-05 ThinkPHP5.1
tp5按月统计金额,并显示该月的支付状态(如果该月有1条未支付信息,则该月显示未支付) $year = $this->request->get('year'); $FinanceModel = new FinanceModel(); $where = []; $where...
thinkphp5.1跨域问题解决
web 0 0
739 0 2022-11-25 ThinkPHP5.1
thinkphp5.1跨域问题解决 方法一:在公共控制器里面初始化方法 protected function initialize() { parent::initialize(); // TODO: Change the autogenerated stub header('Acces...
tp5.1 Warning: require(E:\phpstudy_pro\WWW\shangpinhui.cc\public/../thinkphp/base.php): failed to open stream: No such file or directory in
web 0 0
833 0 2022-11-23 ThinkPHP5.1
从git仓库下载的thinkphp5.1的项目,运行报错: tp5.1 Warning: require(E:\phpstudy_pro\WWW\shangpinhui.cc\public/../thinkphp/base.php): failed to open stream: No such file or director...
开发tp5.1提示控制器不存在,关于控制器类名thinkPHP的驼峰法命名
web 0 0
833 0 2022-11-19 ThinkPHP5.1
这几天刚学习thinkphp开发,控制器名字规范 1.一个是首字母大写(Demo) <?php namespace app\index\controller; class HelloWorld { public function index() { return 'hello,wo...
ThinkPHP提交表单判断上传图片是否为空
web 0 0
841 0 2022-11-07 ThinkPHP5.1
ThinkPHP提交表单判断上传图片是否为空 在用TP框架开发程序处理接收到的表单的时候,要判断<input type="file" name="img">是否有上传图片,来决定是否要将对应的图片信息插入到数据库中。  如果用empty($_FILES)判断业务逻辑可能会出现问题。 即使表单没有上传图片信息...
tp5.1 占位符查询SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
taotaoit 0 0
824 0 2022-11-04 ThinkPHP5.1
tp5.1 占位符查询SQLSTATE[HY093]: Invalid parameter number: parameter was not defined sql语句 ->where('(fromid=:fromid&&toid=:toid)||(fromid=:fromid2&&a...
tp5.1提示SQLSTATE[42S22]: Column not found: 1054 Unknown column 'g.isDel' in 'where clause'
taotaoit 0 1
1364 0 2022-10-25 ThinkPHP5.1
tp5.1提示SQLSTATE[42S22]: Column not found: 1054 Unknown column 'g.isDel' in 'where clause' 提示字段不存在,但数据库里面明明有这个字段, 原因很简单,因为下面还有一条sql语句用到了这条where条件,但是没设置别名->alias...
thinkphp模板中用乘法
taotaoit 0 0
850 0 2022-08-18 ThinkPHP5.1
<li class="wow animated" data-wow-delay="{($key+1)*0.3}s"  这样是不对的,要先计算出值,再在模板中使用 正确做法: {php} $num = ($key+1)*0.3; {/php} <li class="wow animated" da...
关于本站

“最难不过坚持”

本人承接扒站仿站,php网站维护,病毒查杀,网站编辑,网站改版,html制作

有需要网站维护,改版,病毒查杀,网站编辑,网站备案,html制作等相关的工作可以联系我。
本人有多年相关工作经验,也可提供免费咨询,交个朋友。
有需要探讨问题的朋友,也可以加我微信,共同探讨!
微信:15011482830 QQ:408917339

6536040 2619 39
最新评论
https://jueru.net/
评 留言
:weixiao:
评 留言
:shuijiao: :weiqu: :zhenbang: :leng:
评 留言
:yiwen: :yiwen: :yiwen: :yiwen:
评 EasySass: could not generate CSS file. See Output panel for details.
这个业务逻辑多少都有点奇怪了,阅读浏览次数增值在新闻详情页的控制器方法里setInc,这怎么还写进模型事件里了。如果非要用onAfterRead也可以,把新闻文章的内容单独分出来一个news_content表,然后把它和news做关联,然后给news_content表的onAfterRead事件做增值处理,这样点进新闻页内查询到文章内容时才会触发它。
评 TP6模型事件-查询后onAfterRead不好用
文章标签更多
ThinkPHP (254)
Mysql (58)
DedeCms (33)
jQuery (67)
证件照 (1)
setInc (4)
setDec (4)
onclick (5)