易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP写的批量导出IIS域名列表

最近估计很多人都碰到和我同样的问题,就是因为扫黄及备案管理非常严,一个没备案直接关服务器,一个黄站直接封机房。现在网站所有域名必需通过备案,以前还松点。但我们服务器100多个,总不能一个一个检查吧,上网搜了下,有个程序稍合适,但导出的是网站域名站点名,我修改为导出域名列表,同时解决了导出一个站点绑定多个域名的问题,更适合自己的应用,原程序无从考究出处,本着开源原则,现把修改后的源码放出来,希望能对大家有用。
使用方法
1.在IIS中导出xml配置文件。可参考下面图片。在网站点右键,选择所有任务,选择保存至一个文件,例如存为iis.xml。
2.把下面程序复制到记事本后,保存为一个asp文件,例iis.asp,然后放在网站一个有执行脚本权限的目录即可执行。同时需要把刚才导出的xml文件放在同目录下。
<%option explicit
dim fso
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
dim ts
Set ts = fso.OpenTextFile(server.MapPath("iis.xml"),1)  '修改此处的iis备份文件名即可,同目录下哦
dim content
content= ts.ReadAll
content=Replace(content,chr(13),"")
content=Replace(content,chr(10),"")
content=Replace(content,chr(32),"")
content=split(content,"IIsWebServe")
function getdomain(str)
dim reg,readstr,matches,match1
set reg=new Regexp
 reg.Multiline=True
 reg.Global=false
 reg.IgnoreCase=true
 reg.Pattern="ServerBindings(.*)ServerComment"
 Set matches = reg.execute(str)
  For Each match1 in matches
   readstr=match1.Value
  Next
Set matches = Nothingx
Set reg = Nothing
getdomain=replace(readstr,"ServerBindings=","")
getdomain=replace(getdomain,"""","")
getdomain=replace(getdomain,"ServerComment","")
end function
response.Clear()
dim i
for i=0 to ubound(content)
if instr(content(i),"ServerBindings")>0 then
response.Write Replace(getdomain(content(i)),":80:","<br>")&"<br>"
end if
next
%>


相关文档:

asp:treeview

   public static void SetTreeNode(System.Web.UI.WebControls.TreeView treeRolePopedom, string rolecode,out string errMsg)
        {
            int k = 0;
       & ......

asp空间如何判断jmail组件已经安装?是否支持呢?


    试验了好久,终于搞定了。
    首先,必须有错误继续进行的声明On Error Resume Next
    然后尝试简历jmail实例:
Dim JMail
    Set JMail=Server.CreateObject("JMail.Message")
    对实例做出判断,如果组件没有安装成功, ......

asp无法正常显示报表内容问题解决

开发环境:VS2008
WEB服务器:IIS7.0
为何在调试时,可正常显示报表内容,可生成后,运行时,只显示报表框架,并不能正常显示报表内容.
我把浏览器所有限制选项都取消了,还是一样的问题,不知为何.正在寻找答案................... ......

asp 生成静态

<%
Do_Url = "http://"
'Do_Url = Do_Url&Request.ServerVariables("SERVER_NAME")&"/shownews.asp" 主目录
aa=Request.Servervariables("url") '虚拟目录
bb=InstrRev(aa,"/")
cc=left(aa,bb)
Do_Url = Do_Url&Request.ServerVariables("HTTP_HOST")&cc&"index.asp"
call SaveFile("index.h ......

asp读取文本内容

'**************************************************    
'函数名:FSOFileRead    
'作 用:使用FSO读取文件内容的函数    
'参 数:filename ----文件名称    
'返回值:文件内容    
'************** ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号