dim httpd
shell.service.runservice "nbweb", "netbox web server", "netbox http server sample"
'---------------------- service event ---------------------
sub onservicestart()
set httpd = createobject("netbox.httpserver")
if httpd.create("", 80) = 0 then
set host = httpd.addhost("", "\www1")
host.enablescript = true
host.adddefault "index.htm"
host.adddefault "index.html"
host.adddefault "index.asp"
host.adddefault "default.asp"
host.adddefault "default.htm"
host.adddefault "default.html"
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
dim httpd
shell.service.runservice "nbweb", "netbox web server", "netbox http server sample"
sub onservicestart()
set httpd = createobject("netbox.httpserver")
if httpd.create("",83) = 0 then
set host = httpd.addhost("", "")
host.enablescript = true
host.adddefault "1.asp"
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
<%="搜索吧"%>
set console = shell.console
set httpd = createobject("netbox.httpserver")
if httpd.create("", 80) = 0 then
httpd.start
console.readline
httpd.stop
httpd.close
end if
set httpd = nothing
418 host not found
set console = shell.console
set httpd = createobject("netbox.httpserver")
if httpd.create("", 80) = 0 then
httpd.addhost "", "\wwwroot"
httpd.start
console.readline
httpd.stop
httpd.close
end if
set httpd = nothing
set console = shell.console
set httpd = createobject("netbox.httpserver")
if httpd.create("", 80) = 0 then
set host = httpd.addhost("", "\wwwroot")
host.adddefault "default.htm"
httpd.start
console.readline
httpd.stop
httpd.close
end if
set httpd = nothing
set console = shell.console
set httpd = createobject("netbox.httpserver")
if httpd.create("", 80) = 0 then
set host = httpd.addhost("", "\wwwroot")
host.enablescript = true
host.adddefault "default.asp"
host.adddefault "default.htm"
httpd.start
console.readline
httpd.stop
httpd.close
end if
set httpd = nothing
<%response.write "hello"%>
response.write "hello"
dim httpd
shell.service.runservice "nbweb", "netbox web server", "netbox http server sample"
’---------------------- service event ---------------------
sub onservicestart()
set httpd = createobject("netbox.httpserver")
if httpd.create("", 80) = 0 then
set host = httpd.addhost("", "\wwwroot")
host.enablescript = true
host.adddefault "default.asp"
host.adddefault "default.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
if httpd.create("",83) = 0 then
欢迎光临 逐梦论坛 (http://temp2023.zhumeng.org/) | Powered by Discuz! 7.2 |