From f11531e9fc31107a20ac99bb254cf8ef0eef16e4 Mon Sep 17 00:00:00 2001 From: LMR <59361885@qq.com> Date: Tue, 8 Jan 2019 18:44:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BE=E7=89=87=E5=A4=84?= =?UTF-8?q?=E7=90=863?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/info_amp.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/application/controllers/info_amp.php b/application/controllers/info_amp.php index d3f28166..f5137738 100644 --- a/application/controllers/info_amp.php +++ b/application/controllers/info_amp.php @@ -473,7 +473,15 @@ class Info_amp extends CI_Controller } } //html处理 - $html = file_get_contents($html_parh); + if (file_exists($html_parh)) { + $html = file_get_contents($html_parh); + } else { + echo(json_encode(array( + 'status' => 'error', + 'html' => $command.' > '.$html_parh + ))); + return; + } $html = preg_replace('/src="([\d]+).jpeg"/i', 'src="'.$test_host.'/information-view/information/word_source/'.$md5_file.'/$1.jpg"', $html); //删除临时html @unlink($html_parh);