技术 / 设计
Plog添加模板的方法
比较好的方法是:
将压缩包解压后上传至服务器的blog安装目录下的“template”文件夹下,然后
进入后台管理界面--点“管理设置”--“创建摸版”--“扫描摸版”
即可自动添加
plog迁移成功,方法总结
在host1安装(安装方法见plog说明)的plog要想转移到host2,遵循如下步骤:
(1)使用phpmyadmin导出数据库,存为sql文件;
(2)在host2的phpmyadmin中,导入该sql文件;
(3)将所有的plog程序文件传到host2上;
(4)如果数据库设置不同,则修改config/config.properties.php文件,文件内容很简单,一目了然;
(5)登陆admin界面,修改url_base为新的url。
www.plogworld.net介绍如下:
1) backup your database
2) restore your database backup in the new host
3) upload the plog source code to the new host, but don’t run the wizard… it is not necessary since the database already exists
4) see if you need to make any changes to config/config.properties.php (database user and pass, database name, etc)
5) if everything went fine, go to admin->site admin->global settings and change base_url to the new base url
另外,数据库的备份和plog的整体备份,亦可遵循以上步骤。
Mysql升级到4.1的乱码问题解决
开发中遇到将big5的网站升级到uft8的问题。
PHP版本4,mysql 4.1
升级后导入数据显示乱码。
解决方法如下:
(1)在mysql 4.0 中导出数据。无需指定charset,默认即可。
(2)在导出的sql文件中,在每个Create Table的最后(Type=MyISM后面)加上:DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
(3)将mysql4.1的charset也设定为utf8。collation改为utf8_general_ci
(4)使用ConvertZ或UniRed将sql文件转化为utf8编码。注意不要加BOM
(5)使用mysql4.1的phpmyadmin导入数据(.sql文件),即可看见中文
(6)将php程序文件也改为utf8,注意不要有BOM,html的charset也改为utf8。
(7)数据库连接后,运行SET NAMES utf8。



