简体   繁体   English

在iis上监视文件夹

[英]monitor folders on iis

I'm running PHP on IIS (can't change that) and need a php script to run every time a file is added to a watched folder. 我在IIS上运行PHP(无法更改),并且每次将文件添加到监视的文件夹时都需要运行php脚本。 Furthermore I need said script to know the name of the file. 此外,我需要说脚本才能知道文件的名称。

After fighting it a while I have currently solved it by using Transform Manager, and then send the info by notifications. 经过一段时间的努力后,我目前已使用Transform Manager解决了该问题,然后通过通知发送了信息。 While that does i fact do the trick it also deletes the file. 虽然我确实做到了,但它也删除了文件。

So my question is this: how do I stop it from deleting my files or is there an overall better method for doing this? 所以我的问题是这样的:如何阻止它删除我的文件,或者是否有更好的整体方法呢?

一种解决方案是使用带有while循环的长时间运行的脚本,以检查文件夹的内容或上次修改时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM