How to use vbs to convert HTML or txt files to ASP output
This article will explain in detail how to use vbs to convert HTML or txt files into ASP output. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
How to use it: manually change the name of the html file and the file name of the asp you want to generate, then save the following code as 1.vbs, and double-click to run it in the same directory as 1.html.
The code is as follows:
Html = "1.html"
Asp = "1.asp"
Set fso = CreateObject ("Scripting.FileSystemObject")
Set fhtml = fso.OpenTextFile (html, 1)
Set fasp = fso.OpenTextFile (asp, 2, true)
While fhtml.AtEndOfStream true
Text = fhtml.ReadLine
Text = "Response.Write" & "" & Replace (text, ") &"
Fasp.WriteLine (text)
Wend
Fhtml.close
Fasp.close
Set fso = nothing
Msgbox "success"
On "how to use vbs to convert HTML or txt files into ASP output" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.