浏览代码

ftp上传

15954078560 2 年之前
父节点
当前提交
d94606e892
共有 1 个文件被更改,包括 4 次插入4 次删除
  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");