mysql版本:mysql-4.1.21-win32.exe
apache版本:apache_1.3.37-win32-x86-no_src.msi
操作系统:winxp + sp2
php版本:php-4.4.3-win32.zip
我的网站目前要支持中、英文,以后还需支持其它语言。
所以我在创建数据库时都用了utf8
我使用了pear + smarty
php代码如下:
$user = db_dataobject::factory(''users'');
$user->query("select * from users where user_id=1");
$user->fetch();
$smarty->assign(''user'',$user);
$smarty->display(''index.tpl'');
模板文件:
nbsp; html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd">
你的数据库里面存的是什么编码
数据库存为utf-8,还有在的同时,把文件也要保存为utf-8格式。。。
$user->query("set names utf8");
$user->query(&q
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号