PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Cesar
Forum Commoner
Posts: 31 Joined: Sat May 22, 2004 1:35 am
Post
by Cesar » Mon Sep 27, 2004 2:21 am
Hi, I have a problem with send header if my page by UTF-8 encoding.
Code: Select all
<?php
header('Location: ../index.php');
?>
It is dont work when charset=utf-8, but it work when charset=ISO-8859-1.
Where is the error.
Thanks
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Sep 27, 2004 2:46 am
have you tried full urls? Sounds odd, but it may be part of it. Maybe your server is sending out two conflicting content types...?
Breckenridge
Forum Commoner
Posts: 62 Joined: Thu Sep 09, 2004 11:10 pm
Location: Breckenridge, Colorado
Post
by Breckenridge » Mon Sep 27, 2004 2:51 am
try this
Code: Select all
header("HTTP/1.1 303 REDIRECT");
header("Location: http://domain.com/dir/index.php");
header("Connection: close");
Cesar
Forum Commoner
Posts: 31 Joined: Sat May 22, 2004 1:35 am
Post
by Cesar » Mon Sep 27, 2004 2:53 am
--Maybe your server is sending out two conflicting content types...?--
You mean in php.ini
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Sep 27, 2004 2:56 am
no, I mean your code may be sending out conflicting content types. You'd need to look at the page headers your script sends out (actually sends out, not what you are asking it to send)
searching under for my posts with threads that talk about headers and curl will find several I've posted code bits on how to retrieve detailed headers.
Cesar
Forum Commoner
Posts: 31 Joined: Sat May 22, 2004 1:35 am
Post
by Cesar » Mon Sep 27, 2004 3:09 am
I dont send a content. i have index.php in root directory and in index.php i have code
Code: Select all
<?php
header('Location: ../src/index.php');
?>
and i have in /src index.php with my site code.
But first index.php dont redirected to ../src/index.php
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Sep 27, 2004 3:12 am
you probably need a full url. That's what the standard says it should be anyways.
Cesar
Forum Commoner
Posts: 31 Joined: Sat May 22, 2004 1:35 am
Post
by Cesar » Mon Sep 27, 2004 3:18 am
I try with full URL, but it dont work. Problem with function header, it dont work in utf-8 encoding
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Sep 27, 2004 3:20 am
wait, you're putting utf8 encoded characters into the header function?
Cesar
Forum Commoner
Posts: 31 Joined: Sat May 22, 2004 1:35 am
Post
by Cesar » Mon Sep 27, 2004 3:30 am
NO, I create php page on Dreamweaver and Page preferences is view encoding = utf-8. ONLY.
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Mon Sep 27, 2004 3:44 am
try writing the url without ".."
i mean
/src/index.php