NetBox-WebServer主程序 点击下载程序
一款仿IIS程序。默认支持ASP。可单机调试一些简单的ASP程序。
以下代码为默认设置。红色部分分别是端口,主目录和默认首页文件。Dim httpd
Shell.Service.RunService "NBWeb", "NetBox Web Server", "NetBox Http Server Sample"
'---------------------- Service Event ---------------------
Sub OnServiceStart()
Set httpd = NetBox.CreateObject("NetBox.HttpServer")
If httpd.Create("", 80) = 0 Then
Set host = httpd.AddHost("", "\azero.cn")
host.EnableScript = true
host.AddDefault "default.asp"
host.AddDefault "default.htm"
host.AddDefault "index.asp"
host.AddDefault "index.htm"
host.AddDefault "index.html"
host.AddDefault "aoindex.htm"
host.AddDefault "list_1.htm"
httpd.Start
else
Shell.Quit 0
end if
End Sub
Sub OnServiceStop()
httpd.Close
End Sub
Sub OnServicePause()
httpd.Stop
End Sub
Sub OnServiceResume()
httpd.Start
End Sub