Ver Fonte

ftp上传

15954078560 há 2 anos atrás
pai
commit
d94606e892
1 ficheiros alterados com 4 adições e 4 exclusões
  1. 4 4
      application/api/controller/Notify.php

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

@@ -1318,11 +1318,11 @@ class Notify extends Api
         $check_filename = date('YmdH', time() - 3600).'_'.config('cp_id').'_userviewdata_1.chk';
 
         //判断文件是否存在, 不存在则创建
-        if (!is_dir('./dashuju/' . $filename)) {
-            @mkdir('./dashuju/' . $filename, 0755, true);
+        if (!file_exists('./dashuju/' . $filename)) {
+            @touch('./dashuju/' . $filename);
         }
-        if (!is_dir('./dashuju/' . $check_filename)) {
-            @mkdir('./dashuju/' . $check_filename, 0755, true);
+        if (!file_exists('./dashuju/' . $check_filename)) {
+            @touch('./dashuju/' . $check_filename);
         }
 
         $conn = ftp_connect($host, $port) or die("Could not connect");