在 Windows 7 中搜索 php 文件中的内容 [英] search contents in php files in Windows 7

查看:53
本文介绍了在 Windows 7 中搜索 php 文件中的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了很长时间寻找一种在 Windows 7 中在我的一些 php 文件中搜索短语的方法.

I have spent a long time looking for a way to search a phrase across some of my php files in Windows 7.

我做过的事情包括:

  • 在 Windows 资源管理器中启用始终搜索文件名和内容";
  • 在索引选项中的索引属性和文件内容以启用内容搜索"列表中添加php;
  • 确保目录已编入索引;
  • 确保我拥有该目录的权限(C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs).

我还应该尝试什么?在 Windows 7 中甚至可以做到这一点吗?如果没有,我将不得不安装 Cygwin,我现在不愿意这样做.

What else should I try? Is that even possible to do that in Windows 7? If not, I’ll have to install Cygwin, which I am reluctant to do now.

推荐答案

您是否试图自行搜索每个 .php 文件的内容?

Are you attempting to search the contents of each of the .php files themselves?

或者您是否在文件名中搜索具有相应 .php 文件扩展名的短语?

Or are you searching for a phrase in filenames with the corresponding .php file extension?

如果您的目标是前者,以下文本编辑器可以轻松地在打开的文件中查找所有内容"甚至在文件夹中查找所有内容":

If your goal is the former, the following text editors can easily "Find all in open files" and even "Find all in folder(s)":

如果您要查找的是命令行选项,findstr 命令应该可以很好地为您服务.有关 findstr 的更多信息此处.

If what you're looking for is a command line option, the findstr command should serve you just fine. More information on findstr here.

如果您尝试做后者,那么 Dany Caissy 提供的链接看起来就像您要找的一样.

If you're attempting to do the latter, then the link provided by Dany Caissy looks like it'll have just what you're looking for.

这篇关于在 Windows 7 中搜索 php 文件中的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆