From fb0bce8d5cd1f119e00c46fa408b8a25207b354b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E8=AF=9A=E8=AF=9A?= Date: Fri, 12 Oct 2018 10:19:24 +0800 Subject: [PATCH] =?UTF-8?q?CT=E7=9A=84AMP=E8=87=AA=E5=8A=A8=E7=94=9F?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/libraries/Amplib.php | 1 - .../htmlcompressor/controllers/index.php | 2 +- .../htmlcompressor/views/amp-template/ct.php | 236 ++++++++++++++++++ 3 files changed, 237 insertions(+), 2 deletions(-) create mode 100644 application/third_party/htmlcompressor/views/amp-template/ct.php diff --git a/application/libraries/Amplib.php b/application/libraries/Amplib.php index 5630d27b..e2551eb8 100644 --- a/application/libraries/Amplib.php +++ b/application/libraries/Amplib.php @@ -59,7 +59,6 @@ class Amplib { $websitehost = $this->CI->config->item('site_url'); $html_source_url = $this->CI->config->item('site_url') . $data['information']->ic_url; } - //获取网页当前源码,然后发送到信息平台 $html_source = GET_HTTP($html_source_url); if (!empty($html_source)) { diff --git a/application/third_party/htmlcompressor/controllers/index.php b/application/third_party/htmlcompressor/controllers/index.php index 999907c2..376836fa 100644 --- a/application/third_party/htmlcompressor/controllers/index.php +++ b/application/third_party/htmlcompressor/controllers/index.php @@ -157,7 +157,7 @@ class Index extends CI_Controller } if (substr($url, 0, 2) == '//') { //https或http - return urldecode(str_replace('//', 'https://', $url)); + return urldecode('https://'.substr($url, 2, strlen($url)-2)); //只替换开头的//,部分url不规范,有//在url中间 } return urldecode($host . $url); diff --git a/application/third_party/htmlcompressor/views/amp-template/ct.php b/application/third_party/htmlcompressor/views/amp-template/ct.php new file mode 100644 index 00000000..687125fe --- /dev/null +++ b/application/third_party/htmlcompressor/views/amp-template/ct.php @@ -0,0 +1,236 @@ + + + + +<!--@TITLE@--> + + + + + + + + + + + + + + + +
+
China Travel ® CUSTOMIZE
+
+ + +
+
+
+ +
+ + + + + + + + + + + \ No newline at end of file