解决方案 »
- date函数问题
- 如何把表单中输入的内容传到数据库??
- 程序问题,大家来看看~~
- 单引号与双引号的区别
- 将多个一维数组转换成一个二维数组,并求出[2]项值的个数。
- PHP xajax 提交时出现the xml response that was returned from the server is invalid 错误
- 关于 oracle 数据库在 PHP 列表/菜单 中的应用问题
- 请问有人用过 PHP5 中 GD 支持 GIF 吗?
- 正则表达式如何实现与运算?
- 请教一个关于文件的问题
- 关于mac的yosemite系统下安装xmapp之后mysql无法启动的问题,望知道的兄弟能告知一下。
- 请教一个查询
function __construct() {
// 连接数据库
$this->conn = mysqli_connect("localhost", "root", "pass", "2shou");
mysqli_query($this->conn, "SET NAMES gbk");
}
所以 $this->conn 是资源
但你在其他方法中却用 $results = $this->conn->query($sql); 进行访问
那么 $this->conn 什么时候又变成对象了呀?
$this->conn = new mysqli("localhost", "root", "pass", "2shou");
$this->conn->set_charset('gbk');
}