代碼: 選擇全部
//$file_content = preg_replace("/\\{res:\s*CCS_FormatInfo\\}/ise", "CCConvertEncoding(\$CCSLocales->GetText('CCS_FormatInfo'), \$FileEncoding, \$this->internal_encoding)", $file_content);
$file_content = preg_replace_callback("/\\{res:\s*CCS_FormatInfo\\}/is",function($m){ return "CCConvertEncoding(\$CCSLocales->GetText('CCS_FormatInfo'), \$FileEncoding, \$this->internal_encoding)";}, $file_content);
//$file_content = preg_replace("/\\{res:\s*(\w+)\\}/is", "\$CCSLocales->GetText('\\1')", $file_content);
$file_content = preg_replace_callback("/\\{res:\s*(\w+)\\}/is",function($m){ global $CCSLocales; return $CCSLocales->GetText($m[1]);}, $file_content);