Php search file program sharing ,. Php searches for file programs for sharing. for local files, we can use the search provided by windows to find files, but for online files, such as files in the ftp space, this program is very popular with php file search programs to share,
For local systems, we can use the search provided by windows for search. However, for online systems, such as searching for files in the ftp space, this program is very useful.
Php file finder source code:
File search for php) <? Php/** Note: Case sensitive ** by: http://www.daixiaorui.com */if (! Empty ($ _ POST ['path']) &! Empty ($ _ POST ['key']) {echo "in path ". $ _ POST ['path']. "/in Search ". $ _ POST ['key']. the result is:
"; $ File_num = $ dir_num = 0; $ r_file_num = $ r_dir_num = 0; $ findFile = $ _ POST ['key']; function delDirAndFile ($ dirName) {if ($ handle = @ opendir ("$ dirName") {while (false! ==( $ Item = readdir ($ handle) {if ($ item! = "." & $ Item! = ".. ") {If (is_dir (" $ dirName/$ item ") {delDirAndFile (" $ dirName/$ item ");} else {$ GLOBALS ['File _ num'] ++; if (strstr ($ item, $ GLOBALS ['findfile']) {echo"$ DirName/$ item
\ N "; $ GLOBALS ['r _ file_num '] ++ ;}}} closedir ($ handle); $ GLOBALS ['dir _ num'] ++; if (strstr ($ dirName, $ GLOBALS ['findfile']) {$ loop = explode ($ GLOBALS ['findfile'], $ dirName ); $ countArr = count ($ loop)-1; if (empty ($ loop [$ countArr]) {echo"$ DirName
\ N "; $ GLOBALS ['r _ dir_num '] ++ ;}}} else {die (" This path is not available! ") ;}} DelDirAndFile ($ _ POST ['path']); echo"
". $ File_num." files, folders ". $ dir_num." are found in this query.
"; Echo"
A total of ". $ r_file_num." files and folders ". $ r_dir_num." matching results
";}?>
The above is the php file finder program. you can search for local files for easy operations and hope it will be helpful for your learning.
Login, for local, we can use the windows built-in search to find, but for online, such as finding files in the ftp space, this program is very...