PHP Warning: preg_match() expects parameter 2 to be string, object given in C:\inetpub\wwwroot\hp\4.php on line 80
if(!$this -> result || !eregi("^Resource", $this -> result)) { return $this->output("没有数据,请先执行SQL的'select'语句!"); }if(!$this -> result || !preg_match("/^Resource/i", $this -> result)) { return $this->output("没有数据,请先执行SQL的'select'语句!"); }
$this->result 是资源吧?
判断是否为资源应用 is_resource 函数
if(! $this->result || ! is_resource($this->result))
$this->result 是资源吧?
判断是否为资源应用 is_resource 函数
if(! $this->result || ! is_resource($this->result))
$this -> result = @mysqli_query($this -> conn,$this -> sql);
回复 #1,我换了你的 is_resource 函数 解决了报错问题 ,可惜还是读取不了数据库
你把$this->result var_dump一下看是什么东西
回复 #4 var_dump($this -> result)这样么? 加在哪里
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号