duanfan5012 2017-11-17 22:09
浏览 26

文件从一台计算机移动到另一台计算机时未加载图像

I have stored the links to images in a database so I can display them in my web application. The image folder is insider my project folder in htdocs. It works perfectly, but when I copy the project folder from the original htdocs and paste it in the htdocs of another computer, the images fail to load even though the path remains the same. I will be glad if the programmers here can explain to me what is happening. Thank you

here is the server response http://localhost:8080/folder/image/%2059f1c3840bf9b4.70759324.jpg Failed to load resource: the server responded with a status of 404 (Not Found) NB: %20 is not part of the image name. It is a space

  • 写回答

1条回答 默认 最新

  • drgbpq5930 2017-11-17 22:46
    关注

    Either your path is off, or the other machine is not using port 8080.

    Most of the time, port 80 is the default, which does not need any port suffix.

    You should try:

    http://localhost/folder/image/%2059f1c3840bf9b4.70759324.jpg
    

    and if that does not do it, then open your command line and

    cd path/to/localhost/folder/image/

    then pwd to get the current folder path from that location.

    It should also be noted that %20 is a " " space character, and they tend to derp up file paths frequently. For ease of reference, try not to use file names with spaces for anything served on the web.

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b