更新忽略文件列表

master
尹诚诚 8 years ago
parent feb98aa915
commit 25df4c7529

@ -1 +0,0 @@
deny from all

@ -1,10 +0,0 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

@ -64,6 +64,17 @@ class MY_Output extends CI_Output {
return;
}
//精简html和css代码
if (!empty($_GET['static_html_optimize'])) {//设置优化开关,暂时手动优化
$optimize_html = $_GET['static_html_optimize'];
if ($optimize_html === 'comeon') {
$clean_html = GET_HTTP('http://cht.mycht.cn/info.php/apps/htmlcompressor/index/optimize', 'websitehost=' . urlencode('https://data.asiahighlights.com') . '&htmlsource=' . urlencode($output), 'POST');
if (!empty($clean_html)) {
$output = $clean_html;
}
}
}
//解析html生成不同版本的静态文件
$html_object = str_get_html($output);
@ -71,13 +82,13 @@ class MY_Output extends CI_Output {
//替换图片地址用CDN分发
foreach ($html_object->find('img') as $image) {
if (strpos($image->src, 'https://data.asiahighlights.com/') === false){//当查找的字符串在开始位置则返回0所以一定要写===false
if (strpos($image->src, '/pic/') !== false) {
$image->src = 'https://data.asiahighlights.com' . $image->src;
} else if (strpos($image->src, '/image/') !== false) {
$image->src = 'https://data.asiahighlights.com' . $image->src;
}
}
if (strpos($image->src, 'https://data.asiahighlights.com/') === false) {//当查找的字符串在开始位置则返回0所以一定要写===false
if (strpos($image->src, '/pic/') !== false) {
$image->src = 'https://data.asiahighlights.com' . $image->src;
} else if (strpos($image->src, '/image/') !== false) {
$image->src = 'https://data.asiahighlights.com' . $image->src;
}
}
}
//保存PC端代码
$output = $html_object->save();

@ -319,3 +319,30 @@ function price_pregmatch($content) {
}
return $result;
}
function GET_HTTP($url, $data = '', $method = 'GET') {
$curl = curl_init(); // 启动一个CURL会话
curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); // 从证书中检查SSL加密算法是否存在
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
if ($method == 'POST' && !empty($data)) {
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包
}
curl_setopt($curl, CURLOPT_TIMEOUT, 45); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
$tmpInfo = curl_exec($curl); // 执行操作
$errno = curl_errno($curl);
if ($errno !== 0) {
return false;
$error_message = $errno . ' ' . curl_error($curl); //记录错误日志
log_message('error', "train/get_http curl {$error_message}");
}
curl_close($curl); //关闭CURL会话
return $tmpInfo; //返回数据
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

@ -84,6 +84,7 @@ ul.TopList li .TopLine { font-size: 13px; }
.TopThings { background: #f1f1f1; padding-bottom: 30px; padding-top: 30px; }
.AllDetails { text-align: center; color: #b71327; font-size: 18px; }
.toparticle { border-radius: 4px; font-family: Trebuchet MS; margin-bottom: 30px; position: relative; }
.toparticle img { width:100%;}
.toptitle { background: rgba(0, 0, 0, 0.5) none repeat scroll 0 0; border-radius: 0 0 4px 4px; bottom: 0; color: #fff; font-size: 16px; height: 55px; left: 0; padding: 5px 10px; position: absolute; text-align: center; width: 100%; }
.BottomArticle, .ViewMore { background-color: #f1f1f1; padding: 15px; }
.ViewMore { text-align: right; color: #b71327; margin-top: 2px; }

@ -22,7 +22,7 @@ h2 em { display: none; }
.aboutAH p, .topTours p { margin-bottom: 35px !important; }
.topTours { display: block; padding: 30px 0 50px; }
.topTours img { border-radius: 4px 4px 0 0; }
.tourBlock { display: block; background: #fff; border: 1px solid #ccc; overflow: hidden; margin-bottom: 30px; }
.tourBlock { display: block; background: #fff; /* border: 1px solid #ccc;*/ overflow: hidden; margin-bottom: 30px; }
.tourInfo { padding: 15px 15px 0; border-radius: 0 0 4px 4px; text-align: left !important; }
.tourInfo h3 { font-size: 16px; margin: 5px 0 10px; }
.tourInfo .destinations { color: #777; display: block; height: 33px; margin: 10px 0; }
@ -153,4 +153,20 @@ h2 em { display: none; }
.footTailor a { display: block; padding:10px 0; text-decoration: none; color:#fff; font-size:18px;}
@media(max-width:768px) {
.footTailor { position:fixed; bottom:-35px; left:0; width:100% !important; border-radius:0!important; z-index:9999;}
}
}
/* new tour page 2017-5-31 */
.cityList { font-size:14px;}
.cityList li { line-height:18px; margin-bottom:8px; background:url(/pic/square-gray-8x8.png) no-repeat left; padding-left:20px;}
.listImage { display: inline-block; width:19%; margin-bottom:50px;}
.listImage img { max-width:100%; width:100%;}
.tips { background: #fff; height: 250px; padding-left: 15px; padding-right: 10px; padding-top: 5px; border-radius: 0 0 4px 4px; border:1px solid #d1d1d1; margin-bottom:35px; }
.tips span.tourname { color: #04679a; display: block; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 20px; height: 30px; margin-bottom: 5px; margin-top: 5px; }
ul.gray li { background: rgba(0, 0, 0, 0) url(/pic/square-gray-8x8.png) no-repeat scroll 20px center; font-size: 14px; padding-left: 40px; margin-bottom:10px;}
ul.gray { line-height: 24px; margin-left: -20px; }
ul.gray li a:hover { color: #a31022; }
ul.gray li a { text-decoration: none; }
.yztour img { border-radius:4px 4px 0 0;}
.whiteBox { background:#fff; border-radius:0 0 4px 4px; padding:20px 20px 0; border:1px solid #d1d1d1;}
.whiteBox strong { display: block; color:#c1c1c1; margin-bottom:15px; font-size:16px; font-weight: normal;}
.travelIdeas img { border-radius:4px 4px 0 0;}
.bgWhite { background:#fff !important;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save