fopen之后,我可以在PHP中搜索关键字吗?
如果我在文件上使用 fopen
,是否有任何方法可以扫描文件以查找某个关键字开始的字节数?如果没有,我该怎么做?
If I use fopen
on a file, is there any way to scan through the file to find the number of bytes a certain keyword begins at? If not, how can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
单程,
one way,
您表达这个问题的方式听起来像是您正在寻找除基本字符串操作之外的其他东西。如果这就是您的意思 - 不,字符串函数是您唯一的选择。
只需像平常一样获取内容即可。
The way you phrase this question makes it sound like you're looking for something other than basic string manipulation. If that's what you're saying - nope, string functions are your only option.
Just get the content as you normally would.