file->preview;?>
file->charset, $charset, "onchange='setCharset(this.value)' class='form-control'");?>
createLink('file', 'read', "fileID=$file->id"));?>
realPath);
if($charset != $config->charset)
{
$fileContent = helper::convertEncoding($fileContent, $charset . "//IGNORE", $config->charset);
}
else
{
if(extension_loaded('mbstring'))
{
$encoding = mb_detect_encoding($fileContent, array('ASCII', 'UTF-8', 'GB2312', 'GBK', 'BIG5'));
if($encoding != 'UTF-8') $fileContent = helper::convertEncoding($fileContent, $encoding, $config->charset);
}
else
{
$encoding = 'UTF-8';
if($config->default->lang == 'zh-cn') $encoding = 'GBK';
if($config->default->lang == 'zh-tw') $encoding = 'BIG5';
$fileContent = helper::convertEncoding($fileContent, $encoding, $config->charset);
}
}
echo "
" . htmlSpecialString($fileContent) . "
";
?>