dio_* 函数的替代方案
正如我在 php 手册中注意到的那样,我们之间不再有 Direct IO 函数。而我也迫切需要这样的功能。我什至不知道它是否有效,但我需要绕过流包装器和协议。
还有其他选择吗?有什么东西可以在如此低的水平上进行写入和读取吗?
编辑 1
我正要这么说,但一定发生了什么事。我无法以任何方式改变服务器。我无能为力,只能乞求一些像样的功能。这意味着我无法安装 http://pecl.php.net/package/dio。
编辑2
我不知道我是否根本不允许使用这些功能,只是它的php版本高于 5.0.5 ,并且没有安装扩展。所以我对一种解决方法感兴趣,如果我知道如何找到一个...
编辑3
实际的问题是我用自己的包装器覆盖该协议(“文件”),但我仍然需要阅读文件,并且位于现在与“文件”关联的包装器类内,我无法将包装器恢复为默认值。所以我有两个选择: 1. 使用低 io 操作来实际读取与“file”关联的包装器内的文件。 2.使用另一个进程读取文件并在另一个进程中返回结果,但这也有问题
As I noticed in php manual, the Direct IO functions are no more between us. And I am in an urgent need of such a functionality. I don't even know if it will work, but I need to bypass stream wrappers and protocols.
Is there an alternative? Something that will allow to write and read at such a low level?
EDIT 1
I was just about to say it, but something must have happened. I cannot alter in any way the server. I am powerless, and I have to beg for some decent functionality. This means I cannot install http://pecl.php.net/package/dio.
EDIT 2
I don't know if I am not allowed to use these functions at all, it's just that it has a php version higher than 5.0.5 , and it does not have the extension installed. So I am interested in a workaround, if I would have any idea how to find one...
EDIT 3
The actual problem is that I overwrite that protocol ("file") with a wrapper of my own, but I still need to read files, and being inside the wrapper class associated now with "file" I cannot restore the wrapper to default. So I have two options:
1. use low io operations to actually read files inside the wrapper associated to "file".
2. use another process to read the files and return the result in the other process, but this is problematic too
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论