root directory & php
Posted: Fri Aug 06, 2004 9:03 am
feyd | Please use
On my index page I use the following code:
What am I doing wrong or forgetting???
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hi there
Was wondering if any of the php profis here could help me out. (I am very new to php so it's really basic)
I am trying to use a language navigation and unfortunately it's not picking it up??? That means is not changing from one language version to another???
Here is what I have:
index.php
langnav.php
--> docs
------> serbsce
------> nemsce
here are the links to change the language version on my langnav.php:Code: Select all
<a href= 'index.php?langnav=langnav&main=docs/serbsce/main&nav=docs/serbsce/nav'>serbsce</a>
<a href= 'index.php?langnav=langnav&main=docs/nemsce/mainde&nav=docs/nemsce/navde'>deutsch</a>On my index page I use the following code:
Code: Select all
<?php
$main = (isset($_GET['main']))? basename($_GET['main']) : "main";
$nav = (isset($_GET['nav'])) ? basename($_GET['nav']) : "nav";
$langnav = (isset($_GET['langnav'])) ? basename($_GET['langnav']) : "langnav";
$wobraz = (isset($_GET['wobraz'])) ? basename($_GET['wobraz']) : "wobraz";
$mainContent = "$main.php";
$langnavContent = "$langnav.php";
$navContent = "$nav.php";
$wobrazContent = "$wobraz.php";
?>
<?php include("$langnavContent") ?>What am I doing wrong or forgetting???
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]