修改静态化流程

hotfix/远程访问多媒体中心
cyc 6 years ago
parent c903de6019
commit dd8bf09feb

@ -22,6 +22,9 @@ class Index_gm extends CI_Controller
$this->create_amp = $this->input->post('create_amp');
$this->debug = $this->input->post('debug');
/*$this->htmlsource = file_get_contents('aa.htm');
$this->websitehost = 'https://data.chinarundreisen.com';*/
if (empty($this->htmlsource) || empty($this->websitehost)) {
$this->output->set_status_header(500);
echo 'error:htmlsource or websitehost is empty!';
@ -95,6 +98,10 @@ class Index_gm extends CI_Controller
//$js_content.= $link_script->innertext;//js的内容
// $js_content.= $link_script;//js的内容包含<script>
//含有$表示调用了jquery的函数添加延迟加载defer
//包含gtm的js引入就跳出循环
if(strpos($link_script, 'https://www.googletagmanager.com/gtm.js')){
continue;
}
if (strpos($link_script, '$') !== FALSE) {
$js_jquery_content .= $link_script->innertext;
} else {
@ -319,6 +326,8 @@ class Index_gm extends CI_Controller
$css_content .= $style->innertext;
$style->outertext = '';
}
print_r($this->html_object->find('style'));
die();
//把网页内容和css提交到purifycss处理
$purifycss_server = 'http://158.177.67.52:33033/';

Loading…
Cancel
Save