Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否以及如何为 PHP 中的 Apache 2 编写自定义“文件处理程序”(解析文件并使用奖励渲染它)?文件是文本文件,它们可能很大,所以我没有考虑将它们完全加载到内存中,而是逐行处理它们。
我对 Java 和其他语言很熟悉,但在 PHP 方面还是新手;我选择 PHP 是因为它很轻,而且特别可以部署在每台支持 Apache 的机器(甚至是小型 NAS)上,而且,我喜欢 PHP。
谢谢你的提示。
无法在 php 中编写文件处理程序。
但是,您可以使用重写引擎将您想要处理的那些文件重定向到一个 php 脚本,然后该脚本就可以完成这项工作。
可以从服务器变量中获取原始文件。