在Windows Server上运行后台程序

发布于 2024-12-24 19:00:12 字数 229 浏览 3 评论 0原文

我们有一个 Windows 程序,它在运行时自动执行以下操作:

启动时,检查要处理的目录中的新文件。 如果发现新文件,则根据文件抓取特定的 Web 数据。 将新数据输出到另一个目录中的文件中。

我们希望使用 PHP 创建一个 Web 应用程序,将文件上传到第一个目录并使用 exec() 在后台运行该程序。 Windows 服务器是否允许我们在后台运行该程序,直到它完成处理?它是否允许程序连接到网站来抓取数据?

We have a windows program that does the following automatically when run:

When started, checks for new files in a directory to process.
If a new file is found, scrapes specific web data based on file.
Outputs new data into a file in another directory.

We are looking to create a web app using PHP that uploads files into the first directory and uses exec() to run the program in the background. Will a windows server allow us to run the program in the background until it finishes processing? And will it allow a program to connect to websites to scrape data?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

随梦而飞# 2024-12-31 19:00:12

来自深受喜爱的 PHP 手册中的用户注释

pclose(popen("start \"bla\" \"" . $exe . "\" " . escapeshellarg($args), "r"));

From a users note in the beloved PHP Manual:

pclose(popen("start \"bla\" \"" . $exe . "\" " . escapeshellarg($args), "r"));
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文