让KingCMS使用虚拟目录
来源:来自网络 作者:不详 日期:2008-03-29 热度:在page/system/fun.asp里修改,
public property get inst
dim scriptname,l1,I1,I2,I3
if r_inst="" then
I1=server.mappath("/")
I2=server.mappath("../../")
r_inst=replace(right(I2,len(I2)-len(I1)),"\","/")&"/"
end if
inst=r_inst
end property
替换成:
public property get inst
dim scriptname,l1,I1,I2,I3,n
if r_inst="" then
'I1=server.mappath("/") 'disabled by xWay
scriptname = lcase(request.servervariables("script_name"))
I2=lcase(server.mappath("../../"))
'r_inst=replace(right(I2,len(I2)-len(I1)),"\","/")&"/" 'disabled by xWay
'----below added by xWay---------------------
I3 = split(trim(I2),"\")
l1=ubound(I3)
n= instr(scriptname, I3(l1))
if n>0 then
r_inst = left(scriptname, n +len(I3(l1)))
else
r_inst = "/"
end if
'---------------------------------------------
end if
inst=r_inst
end property
然后在这个文件的第三行以下加上:
<%Response.CodePage = 65001:Response.Charset = king_codepage%>




![还你真实的开幕式!震撼美图[转]【连载】](/up_files/image/Article/2008/08/12/57015031.jpg)



