|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
So Fucking Banned
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
|
PHP geeks - quick assist needed :)
Why dosnt this work? - I get the dreaded 'Headers already sent' error.
Code:
<?php function comefrom()
{
$lang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
if (substr($lang, 0, 2) hahahaha 'zh')
{
header("Location: http://asiafriendfinder.com/search/g462236-pct?race=2&show=F&age=18-27");
} else {
header("Location: home.php");
}
}
comefrom();
?>
|
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
|
It probably means this piece of code is somewhere in the middle of your PHP code.. maybe even after something gets outputted (echo). Try moving it to the top.
|
|
|
|
|
|
#3 |
|
So Fucking Banned
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
|
Its ok - I fixed it - I had a line before the function.
|
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
|
Yep.. headers go first.
|
|
|
|