thinkphp icon indicating copy to clipboard operation
thinkphp copied to clipboard

ThinkPHP3.2 ——基于PHP5的简单快速的面向对象的PHP框架

Results 100 thinkphp issues
Sort by recently updated
recently updated
newest added

刚刚建立的tp网站,打开首页是这个样子 ![image](https://user-images.githubusercontent.com/16535358/31581517-72df0720-b1a0-11e7-8605-2b599baa79fe.png) 查询了一番,说是opendir错误。参考https://www.kancloud.cn/manual/thinkphp5/336757后修改nginx配置文件如下,就增加了fastcgi_param PHP_VALUE这一行。 然而,打开网站还是上面的样子。 大牛大神帮我看一下,这里面哪里设置错了。 ` server { listen 80; server_name admin.**mydomain**.com; #index index.html index.htm index.php default.html default.htm default.php; root /var/www/html/admin.mydomain.com/public; location / { index index.htm index.html index.php; if...

如标题所示,'auto_timestamp' => true, 在阿里云RDS器不能用,在本地就可以正常使用!回车后, 浏览器就一直在转圈,最后有一个提示,如下: ``` [2] ErrorException in Connection.php line 441 PDOStatement::execute(): MySQL server has gone away // 是否为存储过程调用 $procedure = in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']); // 参数绑定 if...

public function save($imgname, $type = null, $quality = 80, $interlace = true) { if (empty($this->img)) { E('没有可以被保存的图像资源'); } //自动获取图像类型 if (is_null($type)) { $type = $this->info['type']; } else { $type =...

修正当正则路由无参数时,不能配置的问题。 如“/^aboutus$/i”=>'Home/About/us'

代码(Code): ``` $model = M('User'); $model->user_name = ':username' //注意此处user_name与后面的username是不对应的(Caution: the former user_name is not username ) $model->input_time = ':inputtime' //同上(like upper) $bind = array( ':username' => array($username, \PDO::PARAM_STR), ':inputtime' =>...

查询时,tp为表名加上了前缀,所以找不到表,出错。

虽然自己写原生sql语句也可以,不过还是官方封装一下比较安全统一吧。

Fatal error: Class 'Think\Think' not found in C:\xampp\htdocs\web\simplewind\Core\ThinkPHP.php on line 96 就是这个问题。。

新建一个controller if ($this->allowMethodList) { $methods = $this->allowMethodList; } else { $methods = get_class_methods($this); **$methods = array_diff($methods, array('__construct', '__call', '_initialize'));** } $server->addMethods($methods, $this); //这里的 方法就不连贯了 for ($i = 0; $i <...