Use PHP to do the search engine in the station

xiaoxiao2021-03-06  42

If your site is a static page (there is not much to say with the advantage of the static page), and your virtual host is a good choice for the search engine in the station with PHP! The source code is as follows: instening home page: http://gems.51.net 3 new Welcome to join everyone ************************************************************** ********* / if ("set_time_limit" &&! Get_cfg_var ('SAFE_MODE')) {set_time_limit (600);} $ my_OS = $ http_env_vars ["os"]; $ Linux_doc_path = $ _ server ["Document_Root"]; $ my_path_info = $ http_env_vars ["Path_INFO"]; $ my_path_translated = $ http_env_vars ["path_translated"];

function get_doc_path () {global $ my_os, $ linux_doc_path, $ my_path_info, $ my_path_translated; if (! substr (strtolower ($ my_os), 0,3) = "win") {$ doc_path = $ linux_doc_path; $ doc_path_len = strlen ( $ doc_path); if (Substr ($ doc_path, -1)! = "/") {$ doc_path = $ doc_path. "/";}} else {$ my_path_info_ARRAY = Split ("/", $ my_path_info); $ my_path_translated_Array = split ( "", $ my_path_translated); $ real_path = $ my_path_translated_array [0]. "//"; for ($ i = 1; $ i

Function match_show ($ FileName) {Global $ Ar, $ I, $ DOC_PATH; $ Key = Chop ($ key); if ($ key) {$ msg = preg_replace ("/