Przeglądaj źródła

添加from to 选项

visuddhinanda 2 lat temu
rodzic
commit
6ffd180e92
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      rpc/tulip/tulip/content_download.php

+ 8 - 1
rpc/tulip/tulip/content_download.php

@@ -5,12 +5,13 @@ require dirname(__FILE__) . '/console.php';
 require dirname(__FILE__) . '/pdo.php';
 
 console('debug', 'download full test search content start');
-$param = getopt('b:');
+$param = getopt('b:f:t:');
 
 if (isset($param['b'])) {
     $bookId = (int)$param['b'];
     console('debug', 'update book=' . $bookId);
 }
+
 $PDO = new PdoHelper;
 
 $PDO->connectDb();
@@ -29,6 +30,12 @@ if (isset($bookId)) {
     $from = 1;
     $to = 217;
 }
+if(isset($param['f'])){
+    $from = $param['f'];
+}
+if(isset($param['t'])){
+    $to = $param['t'];
+}
 for ($book = $from; $book <= $to; $book++) {
     $currPage = 1;
     $urlBook = $urlBase . "?book={$book}";