1

i using codeigniter make an project, it as follow. i want to connect to mysql of Vbulletin and show in my project, i save code with UTF-8 not DOM, it show ok but i see at Chrome and IE error HEAD haven't everything. but only TITLE in HEAD and everything after BODY. and have space in "" after BODY

i config database.php in codeigniter is.

$db['default']['char_set'] = 'latin1';//utf8
$db['default']['dbcollat'] = 'latin1_swedish_ci';//utf8_general_ci

i use latin1 because Vbulletin use it.

Html page

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="mr.sam" />

and i try to change chatset is (latin1 or utf-8). BUT IT NOT WORK Please help me THANKS ALL

tinhphaistc
  • 35
  • 2
  • 11

1 Answers1

1

This is good/common question... Put this in index.php:

header("Content-Type: text/html; charset=UTF-8", true);

or

$db['default']['char_set'] = "iso-8859-1";
$db['default']['dbcollat'] = "latin1_general_ci";

in config.php.

Else, checkout this page: http://hash-bang.net/2009/02/utf8-with-codeigniter/

Yousha Aleayoub
  • 4,532
  • 4
  • 53
  • 64