You can just use grep
for it:
grep '$this->te' -R *.php -n
If you want to do similar thing with Ruby, you can use something like:
Dir.glob('*.php').each do |x|
File.read(x).split("
").each_with_index do |line, n|
puts "Found at #{x}:#{n+1}" if line["$this->te"]
end
end
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…