|
|
|
@ -382,6 +382,7 @@ class Info_amp extends CI_Controller
|
|
|
|
|
}
|
|
|
|
|
$md5_name = $md5_file.$ext;
|
|
|
|
|
$path = realpath('../cht-system/views/information/word_source').'/'.basename($md5_name);
|
|
|
|
|
$html = realpath(APPPATH.'/libraries/composer/vendor/');
|
|
|
|
|
if (move_uploaded_file($file['tmp_name'], $path)) {
|
|
|
|
|
$this->load->library('wordphp');
|
|
|
|
|
$rt = new WordPHP();
|
|
|
|
@ -389,7 +390,12 @@ 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);
|
|
|
|
|
/*//phpWord转HTML
|
|
|
|
|
require_once($html.'/autoload.php');
|
|
|
|
|
$phpWord = \PhpOffice\PhpWord\IOFactory::load($path);
|
|
|
|
|
$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, "HTML");
|
|
|
|
|
$xmlWriter->save($path.'.html');
|
|
|
|
|
*/
|
|
|
|
|
echo(json_encode(array(
|
|
|
|
|
'status' => 'success',
|
|
|
|
|
'path' => $path,
|
|
|
|
|