zoukankan      html  css  js  c++  java
  • ecstore前台模板保留css样式

    打开appsitelibcontroller.php

    /*
         * 提取widgets css
         * @var string $body
         * @access public
         * @return void
         */
        public function extract_widgets_css(&$body)
        {
            preg_match_all('/<s*style.*?>(.*?)<s*/s*styles*>/is', $body, $matchs);
            if(isset($matchs[0][0]) && !empty($matchs[0][0])){
                foreach($matchs[0] AS $matchcontent){
                    $body = str_replace($matchcontent, '', $body);
                }
                $this->append_widgets_css($matchs[1]);
            }
        }//End Function
    //改为
    /*
         * 提取widgets css
         * @var string $body
         * @access public
         * @return void
         */
        public function extract_widgets_css(&$body)
        {
            preg_match_all('/<s*style.*?>(.*?)<s*/s*styles*>/is', $body, $matchs);
            if(isset($matchs[0][0]) && !empty($matchs[0][0])){
                foreach($matchs[0] AS $matchcontent){
                   // $body = str_replace($matchcontent, '', $body);//清除原生style样式
                }
                $this->append_widgets_css($matchs[1]);
            }
        }//End Function
  • 相关阅读:
    javascript类继承系列一
    Update Statistics用法
    FOR XML PATH
    SQL Server 中WITH (NOLOCK)
    ROW_NUMBER () 与 PARTITION组合拳
    sql脚本的格式
    存储过程
    动态sql
    尽量不要用select into 复制表
    杂谈
  • 原文地址:https://www.cnblogs.com/limonyun/p/8134201.html
Copyright © 2011-2022 走看看