我从数据库中的网页名称撤出并投入了这种平等声明平等声明:对重定向
// Redirect if not there
if ($db_client === $session_client) {
require("custom.php");
} else {
require("general.php");
}
所以在这里,$ db_client是存储自定义页面的客户端ID和$ session_client作为会话中的id。如果匹配,则应该将用户带到custom.php,如果不是,则应该将它们带到general.php
由于某种原因,PHP向我显示了这两个页面。 general.php顶部和custom.php在general.php
我用这一般网页的底部:
// If not page (path) is stored in db than show general
if (empty($pagename)) {
require_once("general.php");
} else {
require_once("$pagename");
}
任何方式解决这一问题?
你能解释一下这里发生了什么吗? “重定向”是什么意思? – Compeek 2011-04-22 21:28:56
@AAA是否可以通过其他方法调用此代码两次?你也可以使用'require_once()',这样如果这个代码被调用两次,你就不会有两个同样的东西出现。 – Patrick 2011-04-22 21:29:01
@Patrick查看更新。谢谢 – AAA 2011-04-22 21:33:30