php8

thinkphp8 查询数据库后加缓存

为你的 getPaymentList 方法增加缓存,你可以利用 ThinkPHP 的缓存机制。你可以使用 Cache::remember 方法来进行缓存。下面是优化后的代码: us…

php8中,trim(): Passing null to parameter #1 ($string) of type string is deprecated

PHP 8.0 中引入了一个新的警告,指出将 null 传递给 trim() 函数的第一个参数,而 trim() 函数的第一个参数应该是一个字符串,因此这种用法已被弃用。这个警告是…