Home >Backend Development >PHP Tutorial >怎么引用wordpress的变量

怎么引用wordpress的变量

WBOY
WBOYOriginal
2016-06-13 12:09:14979browse

如何引用wordpress的变量
在一个wordpress的项目了 自己新建了一个空白的php文件 ,如何才能引用到wp的内部变量(如$wpdb)?
我试过包含 wp-load.php  或者 wp-config.php 虽然可以 但是包含了他们另到加载时间过长了,有没更好的解决办法?
------解决思路----------------------
global $wpdb;

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