目前,我们在特定域方面存在问题。
FileReader fr = new FileReader("path of the html file");
BufferedReader br = new BufferedReader(fr);
StringBuilder content = new StringBuilder();
while((s=br.readLine())!=null) {
content.append(s);
}
String contentAsString = content.toString();
contentAsString = contentAsString.replace("myOldText", "myNewText");
显示目录; https://example.com
显示了正确的论坛; https://example.com/forum/index.php
被重定向到http://example.com
,可以。如上所述,https://example.com/forum/index.php
显示的目录位于根目录(httpdocs)
https://example.com