Typecho中怎么获得数据库名字

WBOY
Release: 2016-06-06 20:46:46
Original
1379 people have browsed it

在做一个插件,需要用到数据库的名字。。
但是不知道怎么获得。。

从DB类中发现有个getConfig的方法,里面的属性也是我要找的属性,但是都是私有的。。

求解决办法。。

Typecho中怎么获得数据库名字

回复内容:

在做一个插件,需要用到数据库的名字。。
但是不知道怎么获得。。

从DB类中发现有个getConfig的方法,里面的属性也是我要找的属性,但是都是私有的。。

求解决办法。。

Typecho中怎么获得数据库名字

<code class="lang-php">$config = Typecho_Db::get()->getConfig();
$config[0]->database;
</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!