From 125394ee0bd71fb5adf229b74a1408c62b30e8e9 Mon Sep 17 00:00:00 2001 From: "iyuu.cn" <367013672@qq.com> Date: Sun, 23 Feb 2020 01:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E9=AB=98Windows?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=BD=AC=E7=A7=BB=E5=81=9A=E7=A7=8D=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E7=9A=84=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/AutoReseed.php | 2 ++ app/helper.php | 9 +++++++++ config/config.sample.php | 1 - init.php | 1 + readme.md | 3 +-- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/AutoReseed.php b/app/AutoReseed.php index d6a7a2d..4a7b30d 100644 --- a/app/AutoReseed.php +++ b/app/AutoReseed.php @@ -292,6 +292,7 @@ class AutoReseed self::$curl->setOpt(CURLOPT_CONNECTTIMEOUT, $connecttimeout); self::$curl->setOpt(CURLOPT_TIMEOUT, $timeout); } + // P($infohash_Dir); // 调试:打印目录对应表 echo "正在向服务器提交 clients_".$k." 种子哈希……".PHP_EOL; $res = self::$curl->post(self::$apiUrl . self::$endpoints['infohash'], $hashArray); $res = json_decode($res->response, true); @@ -645,6 +646,7 @@ class AutoReseed global $configALL; $type = $configALL['default']['move']['type']; $pathArray = $configALL['default']['move']['path']; + $path = rtrim($path, DIRECTORY_SEPARATOR); // 提高Windows转移兼容性 switch ($type) { case 1: // 减 foreach ($pathArray as $key => $val) { diff --git a/app/helper.php b/app/helper.php index acd6399..57f46af 100644 --- a/app/helper.php +++ b/app/helper.php @@ -448,3 +448,12 @@ function ShowTableSites($dir = 'Protocols', $filter = array()) $table->setRows($data); echo($table->render()); } + +/** + * 是否win平台 + * @return bool + */ +function isWin() +{ + return (DIRECTORY_SEPARATOR == '\\') ? true : false; +} \ No newline at end of file diff --git a/config/config.sample.php b/config/config.sample.php index 4aeff68..301566d 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -134,7 +134,6 @@ return array( // 如果需要自动辅种,必须配置 'passkey' => '', 'id' => 0, // 用户ID - 'is_vip' => 0, // 是否具有VIP或特殊权限?0 普通,1 VIP 'workingMode' => 0, 'watch' => '/root/downloads', 'filter' => array( diff --git a/init.php b/init.php index a998d05..a0f93a3 100644 --- a/init.php +++ b/init.php @@ -50,6 +50,7 @@ if (is_file(ROOT_PATH . "/config/sites.json")) { echo microtime(true).' 正在加载composer包管理器...'.PHP_EOL; require_once ROOT_PATH . '/vendor/autoload.php'; echo microtime(true).' composer依赖载入完成!'.PHP_EOL; +echo microtime(true).' 当前脚本运行环境:'.PHP_OS.PHP_EOL; global $argv; $start_file = str_replace("\\", "/", trim($argv[0])); if (substr($start_file, -8)==="init.php") { diff --git a/readme.md b/readme.md index a6a8f6b..97c9830 100644 --- a/readme.md +++ b/readme.md @@ -47,12 +47,11 @@ IYUU自动辅种工具(英文名:IYUUAutoReseed),是一款PHP语言编 ## 使用方法 详见Wiki: -https://gitee.com/ledc/IYUUAutoReseed/wikis https://gitee.com/ledc/IYUUAutoReseed/tree/master/wiki ## 接口开发文档 -http://api.iyuu.cn/docs.php?type=expand +http://api.iyuu.cn/docs.php ## 需求提交/错误反馈