如何从具有本地主机地址的远程服务器访问文件

如何从具有本地主机地址的远程服务器访问文件

本文介绍了如何从具有本地主机地址的远程服务器访问文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友

我正在使用localhost,并且编写了将图像文件上传到ima​​ges目录,然后将其地址存储到数据库的函数.

在将网站启动到远程服务器之前,我必须上传大约1000张图像.但是问题是如果我在localhost上工作时上传这些图像,则所有图像都具有localhost的地址.但是,当我将站点启动到任何托管服务器时,我将如何访问这些映像,因为它们在数据库中都具有localhost的地址.

例如:
当我上传在本地主机上工作的图像时,其地址将是这样

Dear Friends

I am using localhost and I have written a function which uploads the image file to images directory and then store its address to the database.

I have to upload about 1000 images before launching my site to remote server. But the problem is if I upload these images while working on localhost then all the images have the address of localhost. But When I will launch my site to any hosting server, how I will access these images because they all have the address of localhost in database.

For example:
when i upload image working on local host its address will be like that

"http://localhost/images/file.jpg"



当我将网站启动到实际的托管服务器时,我将如何访问此文件.

请在这种情况下帮助我.



How I will access this file, When I will launch my web to actual hosting server.

Plz Help me in this situation.

推荐答案


这篇关于如何从具有本地主机地址的远程服务器访问文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 02:38