本着少改的原则,提出如下修改办法---
1 查找 function Chinese($dir='./')
修改为
2 查找
- function __construct($dir='./')
$this->config['codetable_dir'] = $dir."../data/codetable/";
修改为
3 查找
- $this->config['codetable_dir'] = ECMS_PATH."e/data/codetable/";
在其后添加:
- /* 如果编码相同,直接返回 */
- if ($source_lang == $target_lang || $source_string == '')
- {
- return $source_string;
- }
4 查找
- return mb_convert_encoding($source_string,$target_lang,$source_lang);
替换为:
- while(list($key,$value)=each($tmp))
邮件发送模块,也有类似的问题。邮件发送模块 e/class/class.smtp.php
- foreach($tmp as $key=>$value)
1 查找 function SMTP() {
修改为
- function __construct() {
- 2查找 while(list(,$line) = @each($lines)) {
- 修改为:
- foreach($lines as $line){
- 3查找
- while(list(,$line_out) = @each($lines_out)) {
- 修改为
- foreach($lines_out as $line_out){
- 4 查找
- while(list(,$l) = @each($entries)) {
- 修改为
- foreach ($entries as $l){