简体   繁体   中英

Sometimes image stored in ftp not displaying in website

Images are stored in an ftp server ,even they are present at the path, not displaying sometimes(first request/ refresh). I used the below code to specify the path :

 <img src=" ftp://username:password@ip.ad.dr.ess/arunsimages/wall_X24JUmm.jpg"

but try to open the path in browser ,will display the image

Just as mplungjan mentioned above, you do not want to serve up an image via FTP in your HTML code. Anyone visiting your page can view the source and grab your username and password. Even if that user login is a read only privileged user, it is still a bad idea.

The IP address in your question resolves to a Net4 hosting account. The hosting provider most likely only allows one instance of that FTP login at a time. Which means the first person to visit your page will see the image, but until that person ends their session, the next visitor will not be able to view the image.

I strongly suggest you contact Net4 and disable that FTP username and password and create a new FTP username and password. If I was able to locate the page that contained the actual username and password because you had the actual IP address in the question, then most likely someone else already has or will once they see this question.

Have a Net4 hosting customer service representative assist you in how to correctly serve up an image with their services.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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