M8m taký istý problém...
Kód:
<?php
if(isset($_GET['lang'])){
switch($_GET['lang']){
case 'en' : $lang = 'en'; break;
case 'sk' : $lang = 'sk'; break;
default: $lang = 'sk';
}
setcookie('ADAME_LANG', $lang, time()+60*60*24*365);
header('LOCATION: '.$_SERVER['PHP_SELF']);
exit;
}
switch(@$_COOKIE['ADAME_LANG']){
case 'en' : $file = 'en.php'; break;
case 'sk' : $file = 'sk.php'; break;
default: $file = 'sk.php';
}
include_once('lang/'.$file);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="spargi.robo@gmail.com" />
<title>Adame.sk</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="http://code.jquery.com/jquery-1.6.1.min.js" type="text/javascript"></script>
</head>
<body>
<div align="center" style="width: 100%;">
<div style="width: 912px;">
<div class="head">
<div id="logo">
<a href="index.php"><img src="images/logo.png" border="0" /></a>
</div>
<div id="hlaska">Staviame na vašej spokojnosti...</div>
<div id="lang_bg">
<span style="left: 13px;"><?php echo ($file == 'sk.php' ? '<a href="?lang=en">English</a></span>' : 'English'); ?></span>
<span style="left: 93px;"><?php echo ($file == 'en.php' ? '<a href="?lang=sk">Slovak</a></span>' : 'Slovak'); ?></span>
</div>
</div>
........ pokracovanie kodu
a ked si zavolam v prehliadaci tuto stranku tak mi to vypise
Kód:
Warning: Cannot modify header information - headers already sent by (output started at /..../...../...../....../lol.php:1) in /...../...../...../...../lol.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /...../...../...../...../lol.php:1) in /...../...../...../...../lol.php on line 9
a nemam tam ziadnu medzeru ani echo ani nic a stale to nejde.... :/