![](https://img-blog.csdnimg.cn/20200528113707228.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
ThinkPHP
ThinkPHP
而我想成为一个有趣的妞
这个作者很懒,什么都没留下…
展开
-
ThinkPHP5伪静态
我使用ThinkPHP5写网站的时候我发现我的URL是这种形式的:http://localhost/product/detail.html?id=42&model=Eyelashes虽然它的的确确是伪静态了,但是伪静态应该是.html在后面才对解决方法:application/config.php// URL普通方式参数 用于自动生成'url_common_param' =&...原创 2018-06-05 13:07:17 · 2298 阅读 · 0 评论 -
【ThinkPHP5】读取别的数据库里面的数据
application/config.php'db2' => [ 'type' => 'mysql', // 数据库类型 'hostname' => '127.0.0.1', //服务器地址 'database' =>...转载 2019-03-23 13:01:14 · 964 阅读 · 0 评论 -
【ThinkPHP】'Error while sending STMT_CLOSE packet. PID think\db\Connection->free()
使用ThinkPHP上传内容 较少的内容可以上传成功多的内容就上传失败报错信息:'Error while sending STMT_CLOSE packet. PID think\db\Connection->free()(重点就是这两句)错误地址指向Connection.php的free()方法解决办法:将Connection.php的相关内容修改为以下的内...原创 2019-01-05 11:19:38 · 5044 阅读 · 0 评论 -
【ThinkPHP】variable type error: array
一开始的写法:return show(1,'success',$major);修改之后的写法return json(show(1,'success',$major));原创 2018-12-27 18:53:37 · 887 阅读 · 0 评论 -
【TP5】A non well formed numeric value encountered
application/database.php// 自动写入时间戳字段 'auto_timestamp' => 'datetime',原创 2018-12-26 20:50:10 · 943 阅读 · 0 评论 -
【TP5】手机端和电脑端之间的自动转换
Index.php<?php namespace app\index\controller;use app\index\controller\Base;use \think\Request;class Index extends Base{ public function index(){ if (Request::instance()->isMobile(...原创 2018-11-20 09:27:54 · 1323 阅读 · 2 评论 -
【报错】thinkphp5.0.22无法输出__DIR__的值
报错信息如下:PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required __DIR__ . './thinkphp/start.php' (include_path='.;C:\php\pear')解决方法:将PHP的版本...原创 2018-11-15 22:06:41 · 1830 阅读 · 0 评论 -
【ThinkPHP5】分页的时候报错Call to a member function appends() on a non-object
sql语句里面写的是select()应该用paginate()原创 2018-11-11 20:35:20 · 1440 阅读 · 0 评论 -
【报错】ThinkPHP5输出time时报错:A non well formed numeric value encountered
打开database.php修改下面一行'datetime_format' => false,原创 2018-07-13 17:25:06 · 565 阅读 · 0 评论 -
【Windows服务器】【IIS】布置PHP环境
公司需要重写网站,一开始是ASP,改写成了PHP,所以就需要在IIS里面布置PHP环境1、下载PHP和mysql安装包2、对于PHP的版本,我个人推荐安装5.4的。IIS不支持5.5以上版本,5.4一下的版本又太低了,我安装过5.2版本的,ThinkPHP框架运行不起来。3、下载fcgisetup安装包:https://pan.baidu.com/s/1UnyENxbyho1h7Jzk...原创 2018-06-14 17:00:31 · 946 阅读 · 0 评论 -
【报错】got a packet bigger than max_allowed_packet
原因:上传的文件大小超出了max_allowed_packet的大小操作mysql的命令行设置max_allowed_packetset global max_allowed_packet = 2*1024*1024*10;查看max_allowed_packetshow variables like 'max_allowed_packet';...原创 2019-04-09 13:39:45 · 270 阅读 · 0 评论