I have the following problem.
code of index.php
-----------------------------------------------------------------------
<?
require_once("dvojka_root.inc");
require_once(ROOT."/admin/common/admin_func.inc");
session_start();
if(isset($_SESSION["user_id"]) && ($_SESSION["user_id"] > 0)) {
include_once(ROOT."/admin/main.php");
} else {
header("Location: " . generate_URL("/admin/login"));
}#end if
?>
---------------------------------------------------------------------------
File "dvojka_root.inc" defines a single constant called ROOT (path to the
wwwroot) used for other includes
File "admin_func.inc" has some functions that are commonly used.
When trying to use constant ROOT in "main.php" (to include "head.inc") i get
an error code, since ROOT is not defined.
code of main.php
----------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<?
include_once(ROOT."/admin/common/head.inc");
?>
<frameset rows="60,*" framespacing="2" border="0" frameborder="0">
<frame name="header" scrolling="no" noresize target="main"
src="/admin/main/header.php">
<frameset cols="175,*">
<frame name="sidebar" target="main" src="/admin/main/sidebar.php">
<frame name="main" src="/admin/main/main.php">
</frameset>
</frameset>
</html>
----------------------------------------------------------------------------
----------------
in a similar case, i set up to test this scenario (using constants definded
in one include in the other), everything work fine, what's wrong???
Thanks!
Mitja Pagon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php