怎么才能连上我本地的数据库,他连的这个数据库哪来的?
素颜
素颜 2016-12-20 14:23:00
0
3
1183
素颜
素颜

越努力越幸运!!!

reply all(3)
钟毅

Generally speaking, this file is found in CONFIG.inc.php of the website, which is the global database configuration file. In the CONFIG directory in the root directory, this file stores the connection file mentioned on the first floor. THINKPHP is generally placed in the COMMON file directory. The file content is an array.

数据分析师

How can I connect to my local database? Where did the database he connected to come from? -PHP Chinese website Q&A-How can I connect to my local database? Where did the database he connected to come from? -PHP Chinese website Q&A

Please watch and learn.

迷茫

用连接Mysqli的方法试试。

//创建对象并打开连接,最后一个参数是选择的数据库名称

$mysqli = new mysqli('localhost','root','','volunteer');

//检查连接是否成功

if (mysqli_connect_errno()){//注意mysqli_connect_error()新特性

die('Unable to connect!'). mysqli_connect_error();

}


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template