将网页保存到硬盘 [英] save webpage to the hard drive

查看:94
本文介绍了将网页保存到硬盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

am正在下载网页并将其保存到硬盘,但是看起来lyk我的代码有问题,将页面保存到硬盘有我的代码,请告诉我它有什么问题
(System.IO.File.Copy("@ C:\\ Program Files(x86)\\ Internet Explorer",strResult);)

am downloading a webpage and save it to the hard drive , but it looks lyk there is something wrong with my code that save the page to the hard drive there is my code , tell me what wrong with it
(System.IO.File.Copy("@C:\\Program Files (x86)\\Internet Explorer", strResult);)

推荐答案

您的代码是尝试复制不是文件的Internet Explorer文件夹.我不知道是什么使您想到了此代码,或者您认为它会做什么,但是我觉得您不了解计算机文件系统的工作原理,更不用说C#代码了.是什么让您认为下载了网页?是什么让您觉得它住在这里?
Your code is trying to copy the internet explorer folder, which is not a file. I have no idea what made you come up with this code, or what you thought it would do, but I feel like you don''t understand how your computer''s file system works, let alone C# code. What made you think that you''d downloaded a webpage ? What made you think it lived here ?


您好Nokukhanya01,

只需将"@"放在文本的开头引号之前...我的意思是,替换为:

Hi Nokukhanya01,

Just place the "@" before the starting quote of the text... I mean, replace this:

(System.IO.File.Copy("@C:\\Program Files (x86)\\Internet Explorer", strResult);)


与此:


with this:

(System.IO.File.Copy(@"C:\\Program Files (x86)\\Internet Explorer", strResult);)



这样就可以完成您的工作.

希望这会有所帮助.

快乐编码:)



this will get your job done.

Hope this helps.

Happy Coding :)


这篇关于将网页保存到硬盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆