如何将文件从服务器下载到本地主机
我刚刚安装了 XAMMP 并在我的计算机上设置了本地主机。我已经有一个工作网站,并且希望将所有文件带到我的计算机上的本地主机,以便我可以开始学习如何编码和试验代码...
问题:如何将所有 php、mysql 文件、图像、 js 等到我的本地主机?我是否将所有文件下载到特定文件夹(例如 localhost htdocs 文件夹)中?或者其他地方? 网络上是否有有人可能知道的教程?
任何建议将不胜感激!
I just installed XAMMP and set up a localhost on my computer. I already have a working website and would love to bring all the files to my localhost on my computer so that I can begin learning how to code and experimenting with code...
Question: how do I bring all the php, mysql files, images, js, etc to my local host? Do I download all the files into a specific folder such as localhost htdocs folder? or somewhere else?
Is there a tutorial anywhere on the web that someone might know about?
Any advice would be much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用 FTP 从主机下载所有文件并将它们放入 htdocs 中,但对于 MySql 文件,您需要导出我们数据库的副本,可能使用
yoursite/phpMyadmin
并使用导出选项卡一次您已导航至您的数据库。You can download all your files using FTP from your host and place them in your htdocs, but for MySql files you need to export a copy of our database probably by using
yoursite/phpMyadmin
and using the export tab once you have navigated to your database.使用您最喜欢的 FTP 软件并下载本地主机上您想要的所有内容。现在转到 XAMPP 安装目录并查找 htdocs。将您下载的所有内容放入该目录中。请注意,您应该保留目录结构。应该做的伎俩!
Use your favorite FTP software and download everything you want available on your localhost. Now head over to the XAMPP installation directory and look for htdocs. Put everything you've downloaded in that directory. Mind that you should keep the directory structure. Should do the trick!
如果您想轻松更新所做更改的文件,可以使用 SVN 或其他版本控制系统 (GIT)。然后,您可以从网站中提取文件并进行编辑,然后将更改推送回网站。如果您对此感兴趣,您可以使用 Eclipse 作为平台并为其下载 SVN 插件。
If you want easily to update the files you do changes on you could use SVN or other version control system (GIT). You could then pull files from your website and edit them and later push changes back to website. If you are interested in this you could use Eclipse as platform and download SVN plugin for it.