881 篇
建站知识总结与分享
搜索“php”
tp5.1更改入口文件到根目录
web 0 0
1066 0 2023-08-28 ThinkPHP5.1
tp5把入口文件放到了public目录中,对于服务器或者vps来说没啥,因为可以指定目录,但是对于虚拟主机就不行了,我们必须吧index.php这入口文件放到根目录,那么我么需要改一下相对的引入文件的路径就可以了,代码如下: // 定义应用目录 define('APP_PATH', __DIR__ . '/applicat...
php7.4,phpExcel报错Trying to access array offset on value of type int
web 0 0
1677 0 2023-08-26 PHP
php7.4,tp5中使用phpExcel报错Trying to access array offset on value of type int 问题描述: 出现报错信息 先百度翻译 ''试图访问int类型值的数组偏移量'' 通过翻译得知 int型的数据被其他不能使用的类型使用了(个人理解) ...
php 操作sqlite
web 1 0
988 0 2023-08-10 PHP
我的php版本7.3.4 前提工作: 打开php.init文件,开启sqlite3扩展: ;extension=sqlite3 把前面的分号去掉保存,重启服务器即可。 SQLite介绍: SQLite是一个开源的、嵌入式的关系型数据库,它的数据库就是一个后缀名为 xx.db xx...
php中屏蔽~E_DEPRECATED错误,使php页面中不再DEPRECATED的错误提示
web 0 0
1214 0 2023-08-08 PHP
E_ERROR:严重错误,系统无法继续执行下去,需要立即停止执行。 E_WARNING:警告级别错误,系统可以继续执行下去。 E_NOTICE:通知级别错误,一些值在赋值之前被使用了。 E_STRICT:编码标准的提示,用于标记一些代码编写不规范的地方。 E_DEPRECATED:在未来版本中将删除的过时功能的提示。 E_PARSE...
详解php中的error错误级别
web 0 0
955 0 2023-08-08 PHP
在使用PHP进行开发时,经常需要用到日志记录功能。PHP提供了error_log函数,可以将错误日志保存到本地或远程服务器。而错误日志分为不同的错误级别,包括: E_ERROR:严重错误,系统无法继续执行下去,需要立即停止执行。 E_WARNING:警告级别错误,系统可以继续执行下去。 E_NOTICE:通知级别错误...
ubuntu chattr: Permission denied while setting flags on index.php
web 0 0
1267 0 2023-08-07 Linux
ubuntu chattr: Permission denied while setting flags on index.php 由于服务器网站一直被篡改,所以考虑用chattr来锁死网站文件, 但是服务器安装的是linux系统ubuntu,默认管理员是ubuntu, 所以用ubuntu登录宝塔终端之后,还是修改不...
Deprecated: Function get_magic_quotes_gpc() is deprecated in
web 0 0
1115 0 2023-08-07 PHP
Deprecated: Function get_magic_quotes_gpc() is deprecated in 原因是PHP 7.4不推荐使用get_magic_quotes_gpc函数替代(PHP 7.4 deprecated get_magic_quotes_gpc function alternative)...
Deprecated: Methods with the same name as their class will not be constructor...
web 0 0
1008 0 2023-08-07 PHP
Deprecated: Methods with the same name as their class will not be constructor... 最近刚把php版本从5.6切换到7.0上,但是再重新打开项目时,报如下错误: Deprecated: Methods with the same name as th...
php7.4报错:Trying to access array offset on value of type null
web 0 0
1310 0 2023-08-02 PHP
php7.4报错:Trying to access array offset on value of type null 一、说明 报错原因:访问类型为 null 的值的 数组下标 7.2中是没问题的,7.4中对语法规范性更为严谨 二、原因 原文:Trying to use ...
Linux 服务器中 PHP 版本从 5.x 升级到 7.x
web 0 0
946 0 2023-07-31 Linux
阿里云centos7部署lamp环境 https://www.alibabacloud.com/help/zh/elastic-compute-service/latest/build-a-lamp-environment-on-a-centos-7-instance 腾讯云社区,centos7升级php版本到php7.2 ht...
PHP simplexml_load_string() 函数
taotaoit 0 0
1068 0 2023-07-17 PHP
simplexml_load_string() 函数转换形式良好的 XML 字符串为 SimpleXMLElement 对象。 https://www.runoob.com/php/func-simplexml-load-string.html <?php $note=<<<XML <n...
php+Postfix+Dovecot邮件服务器,EwoMail 邮件服务器
taotaoit 0 0
1026 0 2023-07-07 其他
php+Postfix+Dovecot邮件服务器,EwoMail 邮件服务器 开源版后台文档:http://doc.ewomail.com/docs/ewomail/jianjie 专业版后台文档:http://doc.ewomail.com/docs/ewomail_v3/jianjie 专业版前台文档:http:...
thinkphp6自定义验证规则
web 0 0
1437 0 2023-07-06 ThinkPHP6
thinkphp6自定义验证规则 protected $rule = [ 'next_visit_time' => ['doCheckNextVisitTime'], ]; protected function doCheckNextVisitTime($value, $rule, $dat...
syntax error, unexpected 'Empty' (T_EMPTY), expecting identifier (T_STRING)
taotaoit 0 0
1330 0 2023-06-28 ThinkPHP6
tp6控制器命名为Empty,结果提示错误 syntax error, unexpected 'Empty' (T_EMPTY), expecting identifier (T_STRING) 翻译:语法错误,意外的“Empty”(T_Empty),应为标识符(T_STRING) Empty 是关键字,不可以拿来...
thinkphp5.1接收不到参数
taotaoit 0 0
979 0 2023-06-19 ThinkPHP5.1
thinkphp5.1接收不到参数, 在一个服务器上挺好的,换了个服务器,接收不到参数articleId了。 http://abc.com/home/news/new_details.html?articleId=1064 打印是null 查看了伪静态 之前是 <IfModule mod_rewr...
PHP中对十六进制字符串执行数学运算,十六进制加减法
web 0 0
1303 0 2023-06-13 PHP
PHP中对十六进制字符串执行数学运算,十六进制加减法 用于将十六进制字符串转换为十进制数,然后转换回来。hexdec,dechex $hex1 = hexdec('3A7BD5'); $sum = (int) ($hex1 / 2); echo dechex($sum); 结果:1d3dea 在此基础上实现十六进制...
关于本站

“最难不过坚持”

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

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

8246674 2696 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)