我在php require_once()
这是我的文档结构:
httpdocs/
|- includes/
| |- footer.php
| |- header.php
|
|
|- signin/ config/
| | |- membersite_config.php
| |
| |- access.php
| |- login.php
| |- login-home.php
| |- page3.php
|
|- index.php
|- page1.php
|- page2.php
这是我现有的index.php
代码:
<!DOCTYPE html>
<html lang="en">
<?php
$page_title = "page title | site name";
$page_description = "page description";
?>
<?php include("includes/header.php"); ?>
<body>
Page body
<?php include("includes/footer.php");?>
</body>
</html>
我需要在index.php
文件的顶部添加此代码。虽然相同的代码在page3.php
上工作正常但它显示500错误
请帮我写下确切的路径。
//I need to add this code with correct path.
<?PHP
require_once("signin/config/membersite_config.php");
if(!$fgmembersite->CheckLogin())
{
$fgmembersite->RedirectToURL("signin/login.php");
exit;
}
?>
//existing code
<!DOCTYPE html>
<html lang="en">
<?php
$page_title = "page title | site name";
$page_description = "page description";
?>
<?php include("includes/header.php"); ?>
<body>
Page body
<?php include("includes/footer.php");?>
</body>
</html>