Home  >  Article  >  Backend Development  >  The functions encapsulated in PHP are not used properly and always prompt parameter issues.

The functions encapsulated in PHP are not used properly and always prompt parameter issues.

WBOY
WBOYOriginal
2016-12-01 00:25:561062browse

The functions encapsulated in PHP are not used properly and always prompt parameter issues.

The functions encapsulated in PHP are not used properly and always prompt parameter issues.

The functions encapsulated in PHP are not used properly and always prompt parameter issues.

The error means that the first parameter of mysqli in my 167 is wrong? Is there something wrong... I don’t quite understand

Reply content:

The functions encapsulated in PHP are not used properly and always prompt parameter issues.

The functions encapsulated in PHP are not used properly and always prompt parameter issues.

The functions encapsulated in PHP are not used properly and always prompt parameter issues.

The error means that the first parameter of my 167 mysqli is wrong? Is there still a problem... I don’t quite understand

<code class="php">$link=connect2();
var_dump($link);</code>

Check if your link is an instance of mysqli, that is, if it is similar

<code>function connect2(){
    return new mysqli("localhost", "xxx", "xxx", "xxx_db");
}</code>

http://php.net/manual/zh/mysq...

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn