866 篇
建站知识总结与分享
搜索“php”
thinkphp5,phpExcel导出,getDataValidation网页可能暂时无法连接,或者它已永久性地移动到了新网址。
taotaoit 0 0
203 0 2024-03-06 ThinkPHP5.1
做excel导出,下拉选项 thinkphp5,phpExcel导出,getDataValidation网页可能暂时无法连接,或者它已永久性地移动到了新网址。 这是为什么呢?也看不到具体错误。 1,首先要看到具体错误,使用$objWriter->save('1.xls');die;这种方法查看到...
thinkphp5,一条sql将数据库中的一个值从0变为1,1变为0
taotaoit 0 0
214 0 2024-03-06 ThinkPHP5.1
thinkphp5,一条sql将数据库中的一个值从0变为1,1变为0 $up = [             "isAccount" => Db::raw('1-isAccount'),           &nb...
php遍历日期范围内的所有月份
taotaoit 0 0
227 0 2024-02-28 PHP
php遍历日期范围内的所有月份 $start = $month = strtotime('2009-02-01'); $end = strtotime('2011-01-01'); while($month <= $end) { echo date('Y-m', $month), '<br>'; ...
php 数组中的null转为空''
taotaoit 0 0
224 0 2024-02-28 PHP
php 数组中的null转为空'' /* * null值转为空字符串 @param array $arr */ private function null2none(&$arr) { foreach ( $arr as $key => $val ) { ...
php函数或方法中引用传递变量
taotaoit 0 0
243 0 2024-02-23 PHP
php函数或方法中引用传递变量 thinkphp模型model中,两个方法重复用到一段代码,就想着把这段代码封装起来, 但是有一个变量需要传递给封装函数处理,并且下面还要用到这个变量, 所以就用到了‘引用传递变量’ public function pageQuery($uId = 0){ $i = 2; ...
Thinkphp5.1 Session失效问题解决方案
taotaoit 0 0
313 0 2024-02-02 ThinkPHP5.1
先收集几个网址 https://blog.csdn.net/come11234/article/details/102519965 ThinkPHP5 session配置过期时间不生效的问题https://codeleading.com/article/82015344080/ tp5设置sessio...
thinkphp 时间戳按天分组sql语句怎么写
taotaoit 0 0
276 0 2024-01-26 ThinkPHP5.1
thinkphp 时间戳按天分组sql语句怎么写 $rs = Db::name('order')->field('FROM_UNIXTIME(create_time,"%Y-%m-%d") day,dataSrc,sum(realTotalMoney+ scoreMoney) totalMoney') ->whe...
实现php 网站底部版权文字自动改变年份
taotaoit 0 0
285 0 2024-01-24 PHP
js <script>document.write(new Date().getFullYear());</script> PHP <?php echo date("Y");?> 例: <p class="copyright">Copyright © <script>...
thinkphp5 validate根据另一个参数的值判断是否必填require
web 0 0
338 0 2024-01-18 ThinkPHP5.1
thinkphp5 validate根据另一个参数的值判断是否必填require 验证某个字段的值等于某个值的时候必须,例如: // 当account的值等于1的时候 password必须 'password'=>'requireIf:account,1' 还有一种情况是layui开关的形式 ...
thinkphp5内置验证规则
taotaoit 0 0
329 0 2024-01-15 ThinkPHP5.1
thinkphp5内置验证规则 https://www.kancloud.cn/manual/thinkphp5_1/354107
thinkphp5,有权限才能下载文件
taotaoit 0 0
331 0 2024-01-15 ThinkPHP5.1
thinkphp5,有权限才能下载文件 需求:留言之后才能下载文件,否则不能下载 实现:留言后,记录ip地址,下载前先检查ip地址是否存在, 代码: 1,模板代码 {notempty name='$details.serviceFile'} <a class="xiaz...
thinkphp5获取系统根目录
taotaoit 0 0
346 0 2024-01-13 ThinkPHP5.1
1,自定义函数 application\common.php里面写上自定义函数 /** * 获取系统根目录 */ function ZHTRootPath(){ return dirname(dirname(__File__)); } 路径类似: D:\phpstudy_pro\WWW\xiangshi.cc ...
thinkphp,jquery自定义添加属性
taotaoit 0 0
266 0 2024-01-12 ThinkPHP5.1
效果图 实现: 1,html代码 <tbody id="spec1Tbody"> </tbody> <tbody> <tr> <th> <a href=...
thinkphp5模板中取余
taotaoit 0 0
298 0 2024-01-09 ThinkPHP5.1
thinkphp5模板中取余 1,在volist标签中,可以设置mod <volist name="list" id="vo" key="i" mod="5"> <eq name="mod" value="0"><tr></eq> <td>{$vo.name}<...
thinkphp5.0关闭日志写入
taotaoit 0 0
326 0 2023-12-26 ThinkPHP5.1
thinkphp5.0关闭日志写入 tp5.1关闭日志可以直接在config/log.php设置 'close'       => false, 但tp5.0配置文件都在application/config.php里面 好像并不能通过'close' ...
thinkphp模板中,session存储的时间戳格式化
taotaoit 0 0
341 0 2023-12-20 ThinkPHP5.1
thinkphp模板中,session存储的时间戳格式化 时间戳存在session中,在模板中使用 {:session('ZHT_USER.lastTime')} 显示:1703033428 想显示日期格式怎么办? {:date('Y-m-d H:i:s',session('ZHT_USER.lastTi...
关于本站

“最难不过坚持”

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

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

6534683 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)