编码问题,更换word转化器

hotfix/远程访问多媒体中心
LMR 7 years ago
parent 1cb2e0507b
commit 6dd4ee072f

@ -389,6 +389,7 @@ class Info_amp extends CI_Controller
$rt->img_prex = $md5_file;
$html = $rt->readDocument($path);
$html = str_ireplace($rt->img_dir, '//202.103.68.62:9096/information-view/information/word_img', $html);
//file_put_contents($path.'.txt', $html);
echo(json_encode(array(
'status' => 'success',
'path' => $path,

@ -39,7 +39,7 @@ class WordPHP
private $doc_xml;
private $doc_media = array();
private $last = 'none';
private $encoding = 'ISO-8859-1';
private $encoding = 'UTF-8';
private $tmpDir = 'tmp';
//图片目录和前缀
public $img_dir = '';
@ -485,6 +485,7 @@ class WordPHP
// look for new paragraphs
$paragraph = new XMLReader;
$p = $reader->readOuterXML();
//return $p;
if ($reader->nodeType == XMLREADER::ELEMENT && $reader->name === 'w:p') {
// set up new instance of XMLReader for parsing paragraph independantly

Loading…
Cancel
Save