codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php $find="advspecial()"; echo findThis('./PathToYourProject/',$find); function findThis($path,$find){ $return=array(); ob_start(); if ($handle = opendir($path)) { $i=0; while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if(is_dir($path.'/'.$file)){ $sub=findThis($path.'/'.$file,$find); if(isset($sub)){ echo $sub.PHP_EOL; } }else{ $ext=substr(strtolower($file),-3); if($ext=='php'){ $filesource=file_get_contents($path.'/'.$file); $pos = strpos($filesource, $find); if ($pos === false) { continue; } else { echo "The string '$find' was found in the file '$path/$file and exists at position $pos<br />"; } }else{ continue; } } $i++; } } closedir($handle); } $return = ob_get_contents(); ob_end_clean(); return $return; } ?>
Private
[
?
]
Run code
Submit