简体   繁体   English

我的wordpress主题出现字符问题

[英]characters issue with my wordpress theme

I creat new customize theme for wordpress and all things was right, just when I upload it on host my characters changed to something like نوشته‌های تازه . 我为wordpress创建了一个新的自定义主题,一切正常,就在我将其上传到主机上时,我的角色更改为نوشته‌Ùایتازه I use meta charset="UTF-8" in my php code, and I use this query in phpmyadmin: SET NAMES UTF8 ; 我在PHP代码中使用meta charset =“ UTF-8” ,并在phpmyadmin中使用以下查询: SET NAMES UTF8 ; http://maideh.ir/issue/ --> its my uploaded theme! http://maideh.ir/issue/- >它是我上传的主题! can any one help me? 谁能帮我? (excuse me for my poor english language;-)) (对不起,我的英语不好;-))

哦...在最新行“?>”之后的我的functions.php中,我有2empty行(输入),在删除thease空行之后,它可以正常工作!

make sure that your host characters are in utf-8, your document charset type is also utf-8. 确保您的主机字符为utf-8,文档字符集类型也为utf-8。 using 运用

mysql_query('set names utf8')

brefore you query the database. 在查询数据库之前。 for example 例如

mysql_query('set names utf8'); mysql_query('设置名称utf8');

mysql_query('select * from table') mysql_query(“从表中选择*”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM