diff --git a/application/controllers/info_amp.php b/application/controllers/info_amp.php index 3f2fca4e..f5eb514d 100644 --- a/application/controllers/info_amp.php +++ b/application/controllers/info_amp.php @@ -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, diff --git a/application/libraries/wordphp.php b/application/libraries/wordphp.php index ac3778cc..e07e0f0b 100644 --- a/application/libraries/wordphp.php +++ b/application/libraries/wordphp.php @@ -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