ignore this whole thread
| From: | Mitja Pagon | Date: | Tue, 04 Jun 2002 14:06:57 +0000 |
| Subject: | ignore this whole thread | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100575@lists.php.net to get a copy of this message | ||
It turned out to be my coding error.
Thanks for all the replies!
Mitja
"Mitja Pagon" <mitja@hatchbit.com> wrote in message
news:20020604132805.5146.qmail@pb1.pair.com...
> 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
>
>
>