💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# DB 配置 ## DB 配置 在使用 DB 相关函数的时候,需要配置数据库相关信息。一般存放在文件中。 #### 新建配置文件 conf.php: ``` <pre class="calibre11">``` <?php return array ( 'db' => array ( 'type' => 'pdo_mysql', 'pdo_mysql' => array ( 'master' => array ( 'host' => 'localhost', 'user' => 'root', 'password' => 'root', 'name' => 'test', 'tablepre' => 'bbs_', 'charset' => 'utf8', 'engine' => 'myisam', ), 'slaves' => array (), ), ), ); ?> ``` ``` #### include 配置文件: ``` <pre class="calibre11">``` <?php $conf = include './conf.php'; include './xiunophp/xiunophp.php'; // 下面就可以使用 db_xxx() 系列函数了,具体请参看文档。 db_create(...); db_update(...); ?> ``` ```