【发布时间】:2011-11-02 03:13:22
【问题描述】:
我有一个从数据库中提取信息的动态 css 文件,例如
header("Content-type: text/css");
require_once('../../../../wp-load.php');
if ( get_option(PREFIX."_theme_base_color") <> "" ){
$default_theme_colour = html_entity_decode(get_option(PREFIX."_theme_base_color"),ENT_QUOTES, "UTF-8");
} else {
$default_theme_colour = 'a3f088';
};
但我真的很讨厌使用 require_once('../../../../wp-load.php');必须有更好的方法 将“wp-load”加载到文件中。
【问题讨论】: