简体   繁体   English

文件目录ftp的问题

[英]problems with file directory ftp

i'm new in using hosting, i have a question about a FTP, why if i upload something (for example a image) to my server i cannot see it from the browser using the directory for example ( http://www.mywebsite.com/public_html/images/backgrounds/background.png ) if i use that address i get a fil with a "?" 我是使用托管的新手,我有一个关于FTP的问题,为什么如果我将某些内容(例如图像)上传到我的服务器,却无法从浏览器使用该目录查看它,例如( http://www.mywebsite .com / public_html / images / backgrounds / background.png ),如果我使用该地址,则会收到带有“?”的文件 sign instead of the image. 标志而不是图像。 the only way to see the image is changing http by ftp for example,( ftp://ftp.mywebsite.com/public_html/images/backgrounds/background.png ) 查看图像的唯一方法是通过ftp更改http,例如( ftp://ftp.mywebsite.com/public_html/images/backgrounds/background.png

please how to find the files with http instead of ftp, to be able to use it in my web page using html 请如何使用http而不是ftp查找文件,以便能够使用html在我的网页中使用它

thank you 谢谢

Typically, the publichtml folder is the root of your domain, which is to say that http://www.mywebsite.com/ points to your/relative/path/to/publichtml/ 通常,publichtml文件夹是您域的根,即http://www.mywebsite.com/指向您的/ relative / path / to / publichtml /

Using your example of putting a file at /publichtml/images/backgrounds/background.png would mean it should be accessible at http://www.mywebsite.com/images/backgrounds/background.png 使用将文件放在/publichtml/images/backgrounds/background.png的示例,这意味着应该可以从http://www.mywebsite.com/images/backgrounds/background.png访问该文件

Similarly, if you put filename.html in the /publichtml/ folder of your server, you should be able to access it at http://www.mywebsite.com/filename.html - If you put it in a subfolder of /publichtml/, say, at publichtml/example/, it should be accessible at http://www.mywebsite.com/example/filename.html 同样,如果将filename.html放在服务器的/ publichtml /文件夹中,则应该可以从http://www.mywebsite.com/filename.html对其进行访问 -如果将其放在/ publichtml的子文件夹中/,例如,在publichtml / example /上,应该可以从http://www.mywebsite.com/example/filename.html访问

This can very from one server to another, but in most situations, this is common practice. 这可以从一台服务器到另一台服务器,但是在大多数情况下,这是常见的做法。

Edit: broken formatting. 编辑:格式损坏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM