如何在 vbulletin 数据库读取中将字符集设置为 utf
how to set charset to utf in vbulletin database read
我在 vbulletin 中使用 php 页面。我使用了一些代码来获取数据并将数据发送到数据库。这是我的代码:
$result =$vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "questions");
但结果不支持 rtl 语言。它把我所有的角色都当作问号。如何在 vbulletin php 页面中定义字符集。
您可以在 includes/config.php
文件中设置字符集:
$config['Mysqli']['charset'] = 'utf8';
Editing the Core config.php File 文档:
If you need to set the default connection charset because your database is using a charset other than latin1, you can set the charset here. If you don't set the charset to be the same as your database, you may receive collation errors. Ignore this setting unless you are sure you need to use it.
我在 vbulletin 中使用 php 页面。我使用了一些代码来获取数据并将数据发送到数据库。这是我的代码:
$result =$vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "questions");
但结果不支持 rtl 语言。它把我所有的角色都当作问号。如何在 vbulletin php 页面中定义字符集。
您可以在 includes/config.php
文件中设置字符集:
$config['Mysqli']['charset'] = 'utf8';
Editing the Core config.php File 文档:
If you need to set the default connection charset because your database is using a charset other than latin1, you can set the charset here. If you don't set the charset to be the same as your database, you may receive collation errors. Ignore this setting unless you are sure you need to use it.