885 篇
建站知识总结与分享
搜索“php”
tp6 return redirect跳转页面不带html
taotaoit 1 0
2094 0 2021-12-07 ThinkPHP6
tp6 return redirect跳转页面不带html return redirect('/admin/index/d_login'); // url地址http://tp6.cc/admin/index/d_login return redirect(url('/admin/index/d_login')); // url地...
tp6 tpl_replace_string template.php改成view.php 定义JS、css路径
web 1 0
1998 0 2021-12-07 ThinkPHP6
return [ // 模板引擎类型使用Think 'type' => 'Think', // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 'auto_rule' => 1, // 模板目录名 'view_di...
thinkphp6 模板中获取配置信息
taotaoit 2 0
2242 0 2021-12-07 ThinkPHP6
thinkphp6 模板中获取配置信息,用助手函数config 例如: 获取URL伪静态后缀 // URL伪静态后缀 'url_html_suffix' => 'html', {:config('route.url_html_suffix')} 获取数据库服务器地址 // 数据库连接...
phpstudy8.0 开启 redis
web 1 0
2115 0 2021-12-03 其他
1,先到phpstudy的环境中下载redis 2,到你配置的项目中开启redis扩展 点击 管理 -> php扩展 -> php_redis 勾选上 3,最后开启redis,建议服务器一起都重启下(开始不知道,这还有启动,导致一直弄不好) php -m 查看扩展 找到 r...
tinkphp6 不想让用户输入admin访问后台
taotaoit 1 2
2028 0 2021-12-03 ThinkPHP6
tinkphp6 不想让用户输入admin访问后台 比如:http://tp6.cc/admin 实际访问的是http://tp6.cc/index.php/admin/index/index.html 找到config/app.php // 禁止URL访问的应用列表(自动多应用模式有效) 'deny_app_...
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.29
web 0 2
5102 0 2021-12-02 其他
问题: Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.29-1+ubuntu20.04.1+de...
vscode扩展修改/编辑/自定义;thinkphp6 snippets扩展多<?php
taotaoit 1 0
2557 0 2021-12-02 VSCode
vscode安装的扩展插件可以自己修改吗? vscode安装的thinkphp6 snippets使用的时候多出一行<?php 页面不写<?php,则弹不出tp-controller提示,如果写了,则又自动添加一行<?php,如图 怎么办呢?能不能修改thinkphp6 snippets? ...
tp6控制器不存在的解决方法:控制器不存在:app\controller\Index
web 2 1
7463 0 2021-12-01 ThinkPHP6
当我们下载tp6,应用 多应用模式的时候,提示错误:控制器不存在:app\controller\Index,如图: 原因 多应用没有配置 解决方法 步骤如下: (1)需要安装多应用模式扩展think-multi-app 进入项目根目录。我的路径是(切记改为自己的项目路径):D:\phpStudy\PHPTutorial\...
thinkphp6 取消Query类的setInc/setDec方法,统一使用inc/dec方法替代
web 1 0
3142 0 2021-11-30 ThinkPHP6
thinkphp6 取消Query类的setInc/setDec方法,统一使用inc/dec方法替代 取消setInc/setDec方法 取消Query类的setInc/setDec方法,统一使用inc/dec方法替代。例如: Db::name('user')->where('id', 1)     ...
thinkphp6使用literal防止模板标签被解析
web 1 0
2049 0 2021-11-30 ThinkPHP6
thinkphp6使用literal防止模板标签被解析 在thinkphp有时候模版标签使用有冲突,特别是在js中,和js语法有冲突,怎么样解决这种冲突,Literal标签可以解决 {literal} {$a + $b} {/literal} <br> {literal} {if condi...
tp6隐藏index.php
web 1 0
1879 0 2021-11-30 ThinkPHP6
composer下载的TP6框架PUBLIC中.htaccess有误,必须重写这个规则才有用。 <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENA...
解决phpstudy的证书报错的问题cURL error 60: SSL certificate problem: unable to get local issuer certifica
web 0 1
2805 0 2021-11-27 PHP
使用了phpstudy作为安装环境后,用阿里云短信接口的时候,报如下错误 cURL error 60: SSL certificate problem: unable to get local issuer certifica php5.6以上的版本会出现这种问题 解决办法: 访问https://curl.haxx.se/...
php 获取数组第一个元素 以及最后一个元素 && 最后一个元素的键名
web 0 0
1842 0 2021-11-25 PHP
1.获取数组第一个元素 $tmp = array('a','b','c','d'); echo reset($tmp); 输出 a 每个数组中都有一个内部的指针指向它的"当前"元素,初始指向插入到数组中的第一个元素。 end() - 将内部指针指向数组中的最后一个元素,并输出 next() - 将内部指针指向数组中的下一个...
PHP重置数组索引为01234连续数字索引
taotaoit 0 0
1675 0 2021-11-25 PHP
PHP重置数组为连续数字索引的几种方式 比如这样的一个php数组: $arr = array( 1 => 'apple', 3 => 'banana', 5 => 'orange' ); 想要转换为这样的数组: $arr = array( 0 => 'apple',...
php将access数据库导入mysql数据库(可用)
taotaoit 0 0
1640 0 2021-11-25 PHP
php版本用php5.3.29,如果提示错误Failed to create COM object `ADODB.Connection'    解决方法:https://taotaoit.com/article/details/1703.html <?php header('Content-Type:...
Failed to create COM object `ADODB.Connection' php连接access提示错误
taotaoit 0 0
2039 0 2021-11-25 PHP
php版本是php5.3.29,用php5.6的版本,还是有问题,就用低版本吧,反正就用于道数据库到mysql php连接access提示错误:Failed to create COM object `ADODB.Connection'  代码: $datapath="abc.mdb"; $c...
关于本站

“最难不过坚持”

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

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

8442509 2703 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 (260)
Mysql (59)
DedeCms (33)
jQuery (74)
证件照 (1)
setInc (4)
setDec (4)
onclick (5)