Set IIsWebServiceObj = GetObject("IIS://localhost/W3SVC")
'WScript.Echo "添加web服務擴展(打開IIS6-- web 服務擴展-- 右擊空白,添加)" ''WebSvcExtRestrictionList, TempStr = "1," & InstallPath & "/php5isapi.dll,1,php,php擴展" For Each Str in IIsWebServiceObj.WebSvcExtRestrictionList If(InStr(Str, "php") = 0) Then TempStr = TempStr & "柳永法" & Str End If Next
'WScript.Echo "添加html' target='_blank'>應用程序擴展名映射(網站屬性-- 主目錄-- 配置-- 映射-- 添加)" ''ScriptMaps TempStr = ".php," & InstallPath & "/php5isapi.dll,5,GET,HEAD,POST,DEBUG" For Each Str in IIsWebServiceObj.ScriptMaps If(InStr(Str, "php") = 0) Then TempStr = TempStr & "柳永法" & Str End If Next
'默認首頁 'IIsWebServiceObj.DefaultDoc = "Index.htm,Index.html,Index.asp,Default.aspx,index.php,Default.htm,Default.asp" 'IIsWebServiceObj.SetInfo If InStr(LCase(IIsWebServiceObj.DefaultDoc), "index.php") = 0 Then IIsWebServiceObj.DefaultDoc = IIsWebServiceObj.DefaultDoc & ",index.php" IIsWebServiceObj.SetInfo End If
WScript.Echo "OK,php環境安裝完成,為了對本程序作者:柳永法,表示感謝,請 大笑三聲^_^" End Function html教程