inherit
88478
0
Nov 29, 2024 11:57:03 GMT -8
Robyn
22,567
September 2006
millsberryfanrob
|
Post by Robyn on Dec 20, 2010 7:16:42 GMT -8
Further down on this board and you'll see my first problem with the website. I fixed it by rebuilding it from scratch. My goal is to convert the header, timeline and footer to php and use index.php's include_once php action to convert it from just html and css. The css is working, yet... coldwar2.robertcity.com/index.phpWhen I go to edit the code, it is normal, so it's not like I saved it incorrectly. Firefox views it with strange characters, as well as Google Chrome IE surprisingly displays the whole website Opera displays the HTML in the header php files etc. Same with Safari...
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Dec 20, 2010 9:53:13 GMT -8
I don't work with php much, but you may need something like this since your hosts default encoding may not be UTF-8.
header('Content-Type: text/html; charset=utf-8');
That's the very first thing that came to my mind, but you may need to just post your code or talk to your host about the problem.
|
|
inherit
88478
0
Nov 29, 2024 11:57:03 GMT -8
Robyn
22,567
September 2006
millsberryfanrob
|
Post by Robyn on Dec 20, 2010 14:11:15 GMT -8
I'm very sure it's a problem with the encoding as I probably saved it one way and am trying to upload it another way.
that looks like a CSS edit, am I right?
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Dec 20, 2010 15:55:09 GMT -8
I'm very sure it's a problem with the encoding as I probably saved it one way and am trying to upload it another way. that looks like a CSS edit, am I right? The page is saved as .php and outputting data so you saved it correctly (unless you mean the text file that the php is reading which could be the problem as well), it's just that the server may be telling your browser to use the wrong encoding and so your browser then tries to read the bytes with the wrong format. Everything is in binary, but the encoding tells the program how to interpret the binary. I could turn this sentence into an image if I had a program interpret the bytes that way. CSS is a client side language which has nothing to do with the server, it only gets interpreted after the server has sent it to your local machine which your browser then uses to style the HTML. The code I gave you is a php function which sends a raw HTTP header (that's what the server sends to the browser before it sends the actual data so your browser knows what it is about to receive and therefore can correctly interpret the raw data). Just put that function call at the top of your php file and see if it fixes your problem. You are also using Quirks Mode which I highly recommend changing. You need to add a DOCTYPE of some sort so browser's (especially IE) will interpret your code correctly. I personally recommend the strict doctype.
|
|