소스 검색

ftp上传

15954078560 2 년 전
부모
커밋
c43475bc50
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      application/api/controller/Notify.php

+ 4 - 1
application/api/controller/Notify.php

@@ -1325,9 +1325,12 @@ class Notify extends Api
             @touch('./dashuju/' . $check_filename);
         }
 
+        //连接ftp
         $conn = ftp_connect($host, $port) or die("Could not connect");
-
+        //登录
         ftp_login($conn,$username,$password);
+        //开启被动模式
+        ftp_pasv($conn, true);
         //利用ftp创建目录
         /*$path = "home/2021-12-08";
         $this->make_directory($conn,$path);