? Php /************************************** * ************* program: spr2 [search_html] Author: uchinaboyE-mail: uchinaboy@163.comQQ: 16863798 Date *******
-
- /*************************************** *************
- Program: Spr2 [search_html]
- Author: uchinaboy
- E-mail: uchinaboy@163.com
- QQ: 16863798
- Date: 2001-8-9
- **************************************** ************/
- // Require ("config. inc. php ");
-
- Function get_msg ($ path ){
- Global $ key, $ I;
- $ Handle = opendir ($ path );
- While ($ filename = readdir ($ handle )){
- // Echo $ path. "/". $ filename ."
";
- $ Newpath = $ path. "/". $ filename;
- $ Check_type = preg_match ("/\. html? $/", $ Filename );
- If (is_file ($ newpath) & $ check_type ){
- $ Fp = fopen ($ newpath, "r ");
- $ Msg = fread ($ fp, filesize ($ newpath ));
- Fclose ($ fp );
- Match_show ($ key, $ msg, $ newpath, $ filename );
- }
- If (is_dir ($ path. "/". $ filename) & ($ filename! = ".") & ($ Filename! = "..")){
- // Echo"
". $ Newpath ."
";
- Get_msg ($ path. "/". $ filename );
- }
- }
- Closedir ($ handle );
- Return $ I;
- }
-
- Function match_show ($ key, $ msg, $ newpath, $ filename ){
- Global $ key, $ I;
- $ Key = chop ($ key );
- If ($ key ){
- $ Msg = preg_replace ("/