thinkphp5.0.24运行与php8.2

第一个错误

 在:\thinkphp\library\think\Loader.php 614行  

判断$type前增加:if($name==NULL){$name='';}

修改后

第二个错误

在:\thinkphp\library\think\App.php 403行  

改为:getType();

 修改后

第三个错误

在:\thinkphp\library\think\db\Query.php 400行 

将{}改为[]

修改后 

第四个错误

位置1 

使用搜索进行修改下面这些地方 

  • \thinkphp\library\think\Paginator.php

增加:use Iterator;
offsetExists($offset)改为 offsetExists($offset):bool
offsetSet($offset, $value)改为 offsetSet($offset, $value):void
offsetGet($offset) 改为 offsetGet($offset):mixed
offsetUnset($offset)改为 offsetUnset($offset):void
getIterator()改为 getIterator(): Iterator|Traversable
count()改为 count():int
jsonSerialize()改为jsonSerialize(): mixed

位置2 

  • \thinkphp\library\think\Collection.php
offsetExists($offset)改为 offsetExists($offset):bool
offsetSet($offset, $value)改为 offsetSet($offset, $value):void
offsetGet($offset) 改为 offsetGet($offset):mixed
offsetUnset($offset)改为 offsetUnset($offset):void
getIterator()改为 getIterator():IteratorAggregate
count()改为 count():int
jsonSerialize()改为jsonSerialize(): mixed

第五个错误 

\thinkphp\library\think\Paginator.php 132行 

去掉第二参数null即可 

修改后 

附:apache伪静态

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
  • 9
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值