Posted by Jerry Stuckle on 07/10/05 17:24
petermichaux@yahoo.com wrote:
> I am doing exactly what Jerry suggested
>
> in "index.php" I have something like the following. (this isn't tested
> because really I have it spread out through a few files.)
>
> <?php
>
> session_start();
>
> define("DEFAULT_LANGUAGE", 'ge');
> define("SITE_ROOT", dirname(__FILE__));
>
> if ( !isset($_SESSION['Language']) )
> {
> $_SESSION['Language'] = DEFAULT_LANGUAGE;
> }
> require_once(SITE_ROOT."/languages/".$_SESSION['Language']."/language.php");
>
> ?>
>
Why confuse things with SITE_ROOT? If you want the server's root directory,
$_SERVER['DOCUMENT_ROOT'] gives it to you.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|