Skip to content
This repository has been archived by the owner on May 28, 2020. It is now read-only.

Commit

Permalink
增加对1.0源路径兼容, 增加debug参数
Browse files Browse the repository at this point in the history
  • Loading branch information
kagurazakayashi committed Mar 9, 2017
1 parent a1ebde3 commit 7d2243c
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 19 deletions.
46 changes: 46 additions & 0 deletions For_production_server/reload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>云颜文字·源商店:内容分发</title></head><body>
<center>云颜文字·源商店<h1>内容分发</h1></center>
<hr>
<?php
ini_set('display_errors', true);
error_reporting(E_ALL);
$starturl = "https://yoooooooooo.com/emoticon/store/";
$localdir = getcwd()."/";
$files = ["emostore.xml","emostore.json","emostore.ylt","updatetime.txt","phparray.txt","index.html"];
echo "<hr><p>开始下载资料到".$localdir."...</p>";
$debug = false;
if (isset($_GET["debug"])) {
$debug = true;
}
for ($i = 0; $i < count($files); $i++) {
$nowfilename = $files[$i];
$url = $starturl.$nowfilename;
$local = $localdir.$nowfilename;
if (!$debug) {
file_put_contents($local,file_get_contents($url))
or die("<hr><p><b>接收分发缓存 <a href=\"".$nowfilename."\" target=\"_blank\">".$nowfilename."</a> 失败。</b></p>");
echo "<hr><p><b>接收分发缓存 <a href=\"".$nowfilename."\" target=\"_blank\">".$nowfilename."</a> 成功。</b></p>";
} else {
echo "<hr><p><b>显示读取缓存 <a href=\"".$nowfilename."\" target=\"_blank\">".$nowfilename."</a> :</b></p>";
echo "<p>需要复制文件 ".$url."".$local." :</p><p>";
echo file_get_contents($url)."</p>";
}
}
//兼容性: 1.0 商店路径
$cdir = getcwd()."/../";
$files = ["emostore.xml","emostore.json"];
$tfiles = ["store.xml","store.json"];
for ($i = 0; $i < count($files); $i++) {
$nowfile = $localdir.$files[$i];
$tofile = $cdir.$tfiles[$i];
if (!$debug) {
copy($nowfile,$tofile)
or die("<hr><p><b>兼容分发缓存 ".$tfiles[$i]." 失败。</b></p>");
echo "<hr><p><b>兼容分发缓存 ".$tfiles[$i]." 成功。</b></p>";
} else {
echo "<hr><p><b>需要兼容分发缓存 ".$nowfile."".$tofile." 。</b></p>";
}
}
//兼容性 结束
?></body></html>
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
Binary file removed 测试等其他东西/csj.png
Binary file not shown.
Binary file removed 测试等其他东西/kt.png
Binary file not shown.
Binary file removed 测试等其他东西/my.png
Binary file not shown.
19 changes: 0 additions & 19 deletions 测试等其他东西/reload.php

This file was deleted.

Binary file removed 测试等其他东西/wic.jpg
Binary file not shown.

0 comments on commit 7d2243c

Please sign in to comment.