check file exists
[Pman.Core] / ConvertStyle.php
index 98183cb..4f52e10 100644 (file)
@@ -52,10 +52,10 @@ class Pman_Core_ConvertStyle extends Pman
     
     function checkHeader($url)
     {
-        if(strpos($url, 'https') !== false)
-        {
-            $this->jerr('accept HTTP url only!');
-        }
+        // if(strpos($url, 'https') !== false)
+        // {
+        //     $this->jerr('accept HTTP url only!');
+        // }
         $headers = get_headers($url, 1);
         if(strpos(is_array($headers['Content-Type']) ? $headers['Content-Type'][0] : $headers['Content-Type'], 'text/html') === false)
         {
@@ -92,8 +92,7 @@ class Pman_Core_ConvertStyle extends Pman
             $data = file_get_contents($file);
         }
         
-        if(preg_match('/^<!--NOT CONVERT STYLE/', $data)){
-            return 'got';
+        if(preg_match('/^\s*<!--\s*NOT CONVERT STYLE\s*-->\s*/', $data)){
             $inLineCss = false;
         }