问题描述
为什么总是显示下面的错误?请求URL不完整。缺少参数qdomain。/?v=1&t=php&qdomain=localhost&f=/linkexchange-generic-asp.asp下面是源码:<%err.clearOnErrorResumeNextifisempty(request("linkexg"))thenls_host=Request.ServerVariables("HTTP_HOST")ls_p=split(ls_host,":")ls_host=ls_p(0)ls_host=LCase(ls_host)ls_host=replace(ls_host,"www.","")lsfn_content="linkex_content_asp_lian666-com-"+ls_host+".txt"lsfn_time="linkex_time_asp_lian666-com-"+ls_host+".txt"setlinkex_fs=Server.CreateObject("Scripting.FileSystemObject")ls_time=cstr(day(now()))setlinkex_tfile=linkex_fs.OpenTextFile(server.MapPath(lsfn_content),1,True,True)iferr.number<>0thenerr.clearls_content=""elsels_content=linkex_tfile.readallendififls_content=""ornotisempty(request("lex_reload"))thenerr.clearsetlinkex_tfile=linkex_fs.createtextfile(server.MapPath(lsfn_time))linkex_tfile.writels_timeiferr.number=0thenls_content=lexgetHTTPPage("http://lian666.com/?v=1&t=php&qdomain="+Request.ServerVariables("HTTP_HOST")+"&f="+Request.ServerVariables("Url"))(就这句qdomain参数有问题)ifls_content<>""thenls_p=split(ls_content,"<!--le_linkslian666.com-->")ls_content=ls_p(1)ls_p=split(ls_content,"<!--/le_links-->")ls_content=ls_p(0)ifls_content<>""thenls_content="<!--le_linkslian666.com-->"+ls_content+"<!--/le_links-->"setlinkex_tfile=linkex_fs.createtextfile(server.MapPath(lsfn_content),true,true)linkex_tfile.writels_contentendifendifelsels_content="<div>error:cantwritefile.pleasecreate2files("+lsfn_content+","+lsfn_time+")andchangethemodofthisfileintowriteable(755),thenclick<ahref=?lex_reload=1>reload</a>.</div>"ifnotisempty(request("lex_reload"))andls_content<>""thenresponse.write("<!--lex_reloadsuccessed.-->")endifendifendififnotisempty(request("le_focus"))thenls_content=replace(ls_content,"<ahref=http://"+request("le_focus"),"<astyle='border:2pxsolidred;'href=http://"+request("le_focus"))endiflinkex_tfile.closeresponse.write(ls_content)elseresponse.write("linkexresponse:"+request("linkexg"))endiffunctionlexgetHTTPPage(url)dimHttpsetHttp=server.createobject("MSXML2.XMLHTTP")Http.open"GET",url,falseHttp.send()ifHttp.readystate<>4thenexitfunctionendiflexgetHTTPPage=lexBytesToBstr(Http.responseBody,"UTF-8")sethttp=nothingiferr.number<>0thenerr.ClearendfunctionFunctionlexBytesToBstr(body,Cset)dimobjstreamsetobjstream=Server.CreateObject("adodb.stream")objstream.Type=1objstream.Mode=3objstream.Openobjstream.Writebodyobjstream.Position=0objstream.Type=2objstream.Charset=CsetlexBytesToBstr=objstream.ReadTextobjstream.Closesetobjstream=nothingEndFunction%>
解决方案
解决方案二:
都告诉请求URL不完整,缺少URL,你的localhost呢
解决方案三:
你访问的时候不要用http://localhost/...用的IP访问或你的域名使用xmlHTTP你需要知道对方需要哪些参数,是否是qdomain是随便的值?如果不是你直接用字符写出域名,比如xxx.com.cn
解决方案四:
/?v=1&t=php&qdomain=localhost&f=/linkexchange-generic-asp.asp参数丢失~