dsfb20227 2012-03-29 15:52 采纳率: 0%
浏览 43


I have a directory on a remote machine in which my clients are uploading (via different tools and protocols, from WebDav to FTP) files. I also have a PHP script that returns the directory structure. Now, the problem is, if a client uploads a large file, and I make a request during the uploading time, the PHP script will return the file even if it's not completely uploaded. Is there a way to check whether a file is completely uploaded using PHP?

  • 写回答

3条回答 默认 最新

  • dptn69182 2012-03-29 15:56

    Setup your remote server to move uploaded files to another directory, and only query the directory files are moved to for files.

    AFAIK, there is no way (at least cross-machine) to tell if a file is still being uploaded, without doing something like:

    1. Query the file's length
    2. Wait a few seconds
    3. Query the file's length
    4. If it's the same, its possibly completed



  • ¥15 maccms影视模板 制作影视网站失败 求
  • ¥15 stm32按键设置闹钟数进退位不正常
  • ¥15 三电平逆变器中点电位平衡问题
  • ¥20 这怎么写啊 java课设
  • ¥15 用C语言完成一个复杂的游戏
  • ¥15 如何批量更改很多个文件夹里的文件名中包含文件夹名?
  • ¥50 MTK手机模拟HID鼠标出现卡顿
  • ¥20 求下下面这个数据结构代码
  • ¥20 前端 二进制文件流图片转化异常
  • ¥15 github上的这个C语言项目如何跑起来