|
Posted by Kimmo Laine on 10/13/06 09:21
"JohnDK" <news@jal.as> wrote in message
news:egnkq3$uqg$1@news01.versatel.de...
> Hi friends.
>
> I need some help here.
>
> I have make this little piece i PHP, all files are where there shall be.
>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>Sporg fordeling</title>
> </head>
> <body>
> <?php
> $userlang=$_SERVER["HTTP_ACCEPT_LANGUAGE"];
> $userlang=substr($userlang,0,2);
> switch($userlang) {
> // Work so far, but the don't work.
> case 'en': ("location: /en/index.php");break;
> case 'de': ("location: /de/index.php");break;
> default: ("location: /da/index.html");
> }
> ?>
1) just writing ("Location :...") does nothing. You propably wanted to call
header("Location...."); ?
2) you're starting output before setting the header, move the <?php ?> part
before you start outputting the html structure, right at the beginning of
the page, otherwise the header won't do anything.
HTH
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|