ÏúÊÛÈÈÏß:027-84490075    15071122275 ¿Í»§Ö§³Ö - ½»·Ñ·½Ê½ - ÁªÏµÎÒÃÇ - ¼ÓÈëÊÕ²Ø - ·±ów

PHPwindÈçºÎÔÚÎÒ¹«Ë¾ÐéÄâÖ÷»úʹÓÃα¾²Ì¬

·¢²¼Ê±¼ä:2010-01-28 21:39:20   ä¯ÀÀÈËÊý: 465771 ´Î  
ÎÒ¹«Ë¾ÐéÄâÖ÷»úÅäÖÃΪIIS+ISAPI URL_reWrite3
ÔÚPhpwind 7.5ϵͳÖпªÆôα¾²Ì¬²¢½øÐÐÒÔϲÙ×÷
 
Ê×ÏÈÄúÐèÒª½¨Á¢Ò»¸öFTPÖеÄwwwĿ¼Àïн¨Ò»¸öÃûΪ.htaccessµÄÎļþ,²¢²åÈëÒÔÏ´úÂëºó±£´æ:
RewriteEngine On
RewriteRule ^commtopics-(.*)-(.*) thread.php?fid=$1&page=$2
RewriteRule ^commtopics-(.*) thread.php?fid=$1&page=$2
RewriteRule ^article-(.*)-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3
RewriteRule ^article-(.*)-(.*).html read.php?tid=$1&page=$2&fpage=$3
RewriteRule ^article-(.*).html read.php?tid=$1
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9_]+.html)$ $1/simple/index.php?$2
 
¡¡È»ºó½«global.php´ò¿ª£¬ÕÒµ½523ÐУ¬Ìæ»»ÒÔϺ¯Êý

function Htm_cv($url,$tag){
global $db_dir,$db_ext;
$tmppos = strpos($url,'#');
$add = $tmppos!==false ? substr($url,$tmppos) : '';
$url = str_replace(
array('.php?','=','&','&',$add),
array($db_dir,'-','-','-',''),
$url
).$db_ext.$add;
return stripslashes($tag)."$url"";

¡¡¡¡È«²¿Ì滻Ϊ:
 
function Htm_cv($url, $tag){//modify By Josh
global $db_dir, $db_ext;
if (!preg_match('/^(http|ftp|telnet|mms|rtsp)|admin.php|rss.php/i', $url)){
$add = strpos($url, '#') !== false ? substr($url, strpos($url, '#')) : '';
if(strpos($url, 'thread.php?') !== false){
unset($rw); //$rw->type $ru->array
$thread_arr = explode('&', substr(str_replace($add, '', $url), 11));
foreach($thread_arr as $key => $value){
$ru = explode('=', $value, 2);
if($ru['1']){
switch($ru['0']){
case 'fid':
$rw['fid'] = $ru['1'];
$rw['type'] < 1 && $rw['type'] = 1;
break;
case 'page':
$rw['page'] = $ru['1'];
$rw['type'] < 2 && $rw['type'] = 2;
break;
default:
$rw['type'] = 4;
$urlfail = 1;
break;
}}}
switch($rw['type']){
case '1':
$url = "commtopics-" . $rw['fid'] ; break;
case '2':
$url = "commtopics-" . $rw['fid'] . "-" . $rw['page'] ; break;
}}elseif(strpos($url, 'read.php?') !== false){
unset($rw);
$read_arr = explode('&', substr(str_replace($add, '', $url), 9));
foreach($read_arr as $key => $value){
$ru = explode('=', $value, 2);
if($ru['1']){
switch($ru['0']){
case 'tid':
$rw['tid'] = $ru['1'];
$rw['type'] < 1 && $rw['type'] = 1;
break;
case 'page':
$rw['page'] = $ru['1'];
$rw['type'] < 2 && $rw[type] = 2;
break;
case 'fpage':
$rw['fpage'] = $ru['1'];
$rw['type'] < 3 && $rw['type'] = 3;
break;
default:
$rw['type'] = 4;
$urlfail = 1;
break;
}}}
switch($rw['type']){
case '1':
$url = "article-".$rw['tid'] . ".html";
break;
case '2':
$url = "article-".$rw['tid'] . "-" . $rw['page'] . ".html";
break;
case '3':
$url = "article-". $rw['tid'] . "-" . $rw['page'] . "-" . $rw['fpage'] . ".html";
break;
}
}
if($urlfail){
$url = str_replace(
array('.php?', '=', '&', $add),
array($db_dir, '-', '-', ''),
$url
) . $db_ext . $add;
}
}
return stripslashes($tag) . "$url"";



ÉÏһƪ£ºÓÐûÓв»Óñ¸°¸µÄÖ÷»ú?
ÏÂһƪ£ºFTP ״̬´úÂë¼°ÆäÔ­Òò
2003-2014 °æȨËùÓРÎ人Íø¸£»¥Áª¿Æ¼¼ÓÐÏÞ¹«Ë¾   net3000.net  
ÒµÎñµç»°£º15927160396  ¿Í·þÈÈÏߣº027-84490075  ¼¼ÊõQQ£º»¶Ó­ÒµÎñ×Éѯ  ¿Í·þQQ£ºÎ人Íø¸£¿Í·þ µçÓÊ£º23444550@qq.com
ÒµÎñ²¿£ºÎ人Êй㲺ÍÍ»ªÖеç×ӳǺóÒ»¶°1µ¥Ôª201ÊÒ  ¿ª·¢²¿£ºÎ人ÄϺþ´óµÀ±£ÀûÐÄÓï25¶°1µ¥Ôª1001ÊÒ     ¶õICP±¸09022096ºÅ    
ÒÔÏÂjsΪ²âÊÔÐÅÏ¢