tags:

views:

204

answers:

1

Why have I got trouble with charset on echo?

$url = "http://ru.wikipedia.org";
$site=file_get_contents($url);
echo $site;
+3  A: 

Try putting header('Content-Type: text/html;charset=utf-8'); at the start of your file

soulmerge
I did it! but I have got this trouble again.screenshot here: http://img510.imageshack.us/img510/5028/123mk.gif
butteff
Fatal error: Call to undefined function headers()
butteff
When I write into html file <meta http-equiv="content-type" content="text/html; charset=utf-8" /> it does not work too
butteff
Sorry, it's `header()`, not `headers()`
soulmerge
oh!Sorry! It's my inattention!
butteff