With offline download some novels, put on the local area network, want to use their own design of the page display, content in a table, if you take all the HTML, there will be effect problems, so only take <body ....> between the code as follows:
<%
Dim filepath
Filepath=replace (Request.QueryString ("tar"), Chr (34), "" "
Filepath=server.mappath (filepath)
Set X=server. CreateObject ("Scripting.FileSystemObject")
Set Y=x.opentextfile (Filepath,1,false)
Result=y.readall ()
Y.close
Set y=nothing
Set x=nothing
' End If
Result=lcase (Result)
''''''''''''''''''''''''
Result=mid (Result,instr, "<body"), InStr (Result, "</body>"))
Result=replace (Result, "</body>", "")
Result=mid (Result,instr (result, ">") +1)
''''''''''''''''''''''''
' Below, convert all connections in open files
"<a href=" c.html ">---><a href=" show.asp?tar=c.html ">
' Or---><a href= ' show.asp?tar=a/b/c.html ' >
If InStr (Request.QueryString ("tar"), "/") <>0 Then
Dim temp
Temp=left (Request.QueryString ("tar"), InStrRev (Request.QueryString ("tar"), "/")
Result=replace (Result, "href=" & Chr), "href=" & Chr (+) & "show.asp?tar=" & Temp)
Else
''
Result=replace (Result, "href=" & Chr), "href=" & Chr (+) & "show.asp?tar=")
End If
Response.Write "<pre>" & Result & "</pre>"
%>