<分区>
我试图在我的 Wordpress 站点的 header.php
中包含一些 .php
文件。
这是我的架构:
Root/
|_ includes
|_ db_connect.php
|_ functions.php
|_ var_list.php
|_ wp-includes
|_ wp-content
|_ themes
|_ NameTheme
|_ header.php
|_ wp-admin
我需要在我的 header.php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
include_once 'includes/var_list.php';
sec_session_start(); // function to start session, placed in functions.php
我的尝试:
- 使用
$_SERVER['DOCUMENT_ROOT']
- 使用
dirname(_FILE_)
- 使用
ABSPATH
//这是在我的wp-config.php
上定义的
- 使用
home_url
- 使用
site_url
全部返回空白页(500内部错误) 可以帮帮我吗? 谢谢。