我想更改浏览网站时显示的默认网页.我目前正在运行一个报告程序,它输出一个名为index.html的文件.我不能改变它所谓的文件.因此,我的目标网页必须被称为其他内容.现在,当我浏览我的网站时,它会将我带到报告页面.
从我看到的,无论你怎么称为index.html,它都会将其作为默认值.我想将其更改为landing.html.我该怎么做呢?
我是一个文件夹(Folding @ Home).报告程序是HFM.net.HFM可以使用我当前的折叠统计信息输出html文件.它命名html文件索引.我不希望它成为我的默认主页.我想要一个类似菜单的登陆,我可以选择是否要查看我的统计数据或其他内容.该网站位于/ home/tyler/Documents/hfm/website(landing.html和hfm的index.html在这里).Apache2位于其默认目录中.
我也在运行Ubuntu 13.04.
$wc = New-Object System.Net.WebClient
$DownloadString = $wc.DownloadString("http://www.example.com")
$HTML = New-Object -ComObject "HTMLFile"
$HTML.IHTMLDocument2_write($DownloadString)
Run Code Online (Sandbox Code Playgroud)
运行服务器脚本
Major Minor Build Revision
----- ----- ----- --------
5 1 14409 1005
Run Code Online (Sandbox Code Playgroud)
开发PC
Major Minor Build Revision
----- ----- ----- --------
5 1 15063 502
Run Code Online (Sandbox Code Playgroud)
我的Windows 10开发PC在上面的代码中运行良好.我想在我的Server 2008 R2 x64机器上运行它.我将其升级到PowerShell v5.我得到以下内容:
方法调用失败,因为[System .__ ComObject]不包含名为"IHTMLDocument2_write"的方法.
后来......
Unable to find type [mshtml.HTMLDocumentClass].
Run Code Online (Sandbox Code Playgroud) powershell internet-explorer ihtmldocument2 windows-server powershell-5.0