托管时的JPG问题,但在本地工作 [英] JPG issue when hosting but works locally

查看:52
本文介绍了托管时的JPG问题,但在本地工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前为大学项目创建了一个网页,现在我想更多地研究它。在本地它工作正常(在合理范围内)。但是,当我在Go-daddy上托管它时,我需要将Chrome HTML文档重命名为Index.htm才能加载。现在真正的问题是我的jpg没有显示。当我在本地查看它看起来应该是这样,但是当它被托管时它们会消失。有趣的是,Shockwave flash在任何迭代中都不起作用,但在重命名为Index.html时显示(仍然不起作用)。不确定你需要什么代码参考jpg。我可以根据要求添加任何相关的CSS文件。任何帮助将不胜感激。





I created a webpage for a college project sometime ago, and now I would like to work on it more. Locally it works fine(within reason). However, when I hosted it on Go-daddy, I needed to rename the Chrome HTML Document to Index.htm for it to load. The real issue now is that my jpg's are not showing. When I view it locally it looks like it should, but when it is hosted they disappear. Interestingly enough, the shockwave flash does not work in either iteration but shows up (still doesn't work) when it is renamed to Index.html. Not sure what code you would need reference the jpg's. I can add any of the relevant CSS files upon request. Any help would be greatly appreciated.


<!DOCTYPE html>
<html>

   <head>
<!--
      New Perspectives on HTML and CSS
      Tutorial 7
      Tutorial Case

      Metallica Live Tribute Page
      Author: Brian Connelly
      Date:   5/4/16

      Filename:         Metallica.htm
      Supporting files: met.css,av.css,metallica star.jpg, metallicaalive1,2,3.jpg,metallicagoup.jpg, 
      metallical seek and destroy tampa.mp3 and .ogg, metallica -logo.jpg

   -->

<meta charset="UTF-8" />
<title>Metallica A-Live and Kicking</title>
<script src="modernizr-1.5.js"></script>

<link href="met.css" rel="stylesheet" />
<link href="av.css" rel="stylesheet" />
<link href="effects.css" rel="stylesheet" />
</head>

<body>

      
      <header class="main">
         
         <nav class="horizontal">
           <ul>
            <li><a href="#">Home</a></li>
            <li><a href="https://metallica.com/">Official Site</a></li>
            <li><a href="https://metallica.com/band/members">The Band</a></li>
            <li><a href="http://metbootlegs.com">Bootlegs</a></li>
            <li><a href="https://metallica.com/releases/albums">Albums</a></li>
            <li><a href="#">Contact Us</a></li>
            <li><a href="https://www.paypal.com/home">Donate</a></li>
        </ul>
        </nav>
        
      
           <img src="metallicaalive.jpg" align="center" >
           
      </header>

      <nav class="vertical">
         <ul>
            <li class="lTitle">Everything Metal</li>
            <li><a href="#">Home</a></li>
            <li><a href="#">User Comments</a></li>
            <li><a href="#">Reviews</a></li>
                       

            <li class="lTitle">Top 10 Metallica Songs (voted)</li>
            <li><a href="https://www.youtube.com/watch?v=CD-E-LDc384">Enter Sandman</a></li>
            <li><a href="https://www.youtube.com/watch?v=J-tvJcTPxHc">Seek and Destroy</a></li>
            <li><a href="https://www.youtube.com/watch?v=Tj75Arhq5ho">Nothing Else Matters</a></li>
            <li><a href="https://www.youtube.com/watch?v=lXWq3f01e2U">Creeping Death</a></li>
            <li><a href="https://www.youtube.com/watch?v=C4nCy5CITc8">The Four Horseman</a></li>
            <li><a href="https://www.youtube.com/watch?v=xnKhsTXoKCI">Master Of Puppets</a></li>
            <li><a href="https://www.youtube.com/watch?v=A8MO7fkZc5o">Sad But True</a></li>
            <li><a href="https://www.youtube.com/watch?v=17HRV8k1YMw">For Whom The Bell Tolls</a></li>
            <li><a href="https://www.youtube.com/watch?v=WM8bTdBs-cw">One</a></li>
            <li><a href="https://www.youtube.com/watch?v=UBhqOvhy-6o">Fuel</a></li>
             

            <li class="lTitle">Albums By Date</li>
            <li><a href="https://metallica.com/releases/albums">Kill 'Em All</a></li>
            <li><a href="https://metallica.com/releases/albums">Ride The Lightning</a></li>
            <li><a href="https://metallica.com/releases/albums">Master Of Puppets</a></li>
            <li><a href="https://metallica.com/releases/albums">...And Justice For All</a></li>
            <li><a href="https://metallica.com/releases/albums">Black</a></li>
            <li><a href="https://metallica.com/releases/albums">Load</a></li>
            <li><a href="https://metallica.com/releases/albums">Re-Load</a></li>
            <li><a href="https://metallica.com/releases/albums">Garage Inc.</a></li>
            <li><a href="https://metallica.com/releases/albums">S&M </a></li>
            <li><a href="https://metallica.com/releases/albums">St. Anger</a></li>
            <li><a href="https://metallica.com/releases/albums">Death Magnetic</a></li>
            <li><a href="https://metallica.com/releases/albums">Through The Never</a></li>
            
            <li class="lTitle">Similar Bands</li>
            <li><a href="http://www.judaspriest.com/home/">Judas Priest</a></li>
            <li><a href="http://www.saxon747.com/en/">Saxon</a></li>
            <li><a href="http://www.ozzy.com/">Ozzy Ozbourne</a></li>
            <li><a href="http://www.blacksabbath.com/welcome.html">Black Sabbath</a></li>
            <li><a href="http://www.megadeth.com/">Megadeth</a></li>
         </ul>
      </nav>

      <section class="middle">

         <article>
            <h2>Band Members</h2>
            <p>                 
                  James Hetfied ... Vocals, Guitar<br />
                  Lars Ulrich ... Drums<br />
                  Kirk Hammett ... Guitar, background vocals<br />
                  Robert Trujillo ... Bass, background vocals<br />
            </p> 
         
         </article>

         <article>
         <h2>History</h2>
<p>
    Ah, the joy of humble beginnings… Metallica, one of the biggest selling acts in American history, were born on October 28,
    1981 when drummer Lars Ulrich and guitar player/singer James Hetfield got together via Ulrich’s LA Recycler newspaper
    ad. Soon, the two had recruited Hetfield’s friend and housemate Ron McGovney to play bass, Dave Mustaine to play lead
    guitar, and taken the name Metallica after a suggestion from Bay Area metal scene friend Ron Quintana. Their ascent was
    to be relatively quick, driven by sheer work-rate, effort and a rare musical chemistry. After hitting the opener’s circuit
    in LA (where they supported the likes of Saxon) they recorded their first ever demo No Life ‘Til Leather. The tape-trading
    circuit went crazy for it, and after repeatedly well-received shows in the Bay Area, Metallica found themselves relocating
    there after convincing bassist Cliff Burton to leave his band Trauma and replace McGovney.
    </p>
    <p>See the rest of the story <a href="https://metallica.com/band/history" style="color: black">here</a></p>
    
    </article>
     
     
     <article>
         <h2>Tour Photos</h2>
          <p>
   There is nothing in the world like Metallica live. Each person has their own memories, here are some of ours..</p>
         <img src="metallicalive1.jpg"  width="280" height="210" alt="metallica live"/> 
         <img src="metallicalive2.jpg"  width="280" height="210" alt="metallica live"/>
         <img src="metallicalive3.jpg"  width="280" height="210" alt="metallica live"/>
     
   
    <p>For a complete collection of Metallica photos click <a href="https://metallica.com/media/photos" style="color: black">here</p>

    
    </article>
     
     
      </section>

      <section class="right">

                 
         
         <article>
           <h2>Tampa Live</h2>
<audio controls="controls">
                
                <p>Seek and Destroy Live In Tampa 2009</p>
               
               
                <source src="metallica-seek and destroy tampa.mp3" />  
                <source src="metallica-seek and destroy tampa.ogg" />
                
                <embed src="metallica-seek and destroy tampa.mp3" 
                type="audio/mpeg"
                height="20"
                width="250"
                autoplay="no"
                controller="yes"     
                />
                  </audio>



            <p>"Seek & Destroy" is a song on their debut studio album, Kill 'Em All. It was also featured on the demo No Life 'til Leather. It was the first song the band recorded in a studio. "Seek & Destroy" has been frequently performed at the group's concerts, and was the last song played at the live show in Tampa!
            </p> 
         </article>

         <article>
            <h2>Live Video</h2>

            
<video controls="controls">
    <source src="metallica3.mp4" />
</video>

<p>The closing of the show in Tampa Florida was one for the ages. As the house lights came one, and the band was conversing
    with the crowd, they announced that there would be one more song. This song was going to be performed with the house
    lights up! The entire <cite> Ice Palace</cite> was exhausted and filled with energy at the same time. Then came the song
    everyone was waiting for....<cite> Seek and Destroy</cite>. As the melodiously hard riffs deafend all who were there,
    black Metallica balls fell from the ceiling, and the place went crazy!
</p>


<object width="640" height="349">
    <param name="movie"
    value="https://youtu.be/YABfT45J1ak" />
    <param name="allowFullScreen" value="true" />
    <embed src="https://youtu.be/YABfT45J1ak"
    type="application/x-shcokwave-flash"
    width="640" height="349"
    allowFullScreen="true"/>  
    </object>

<iframe width="420" height="315" src="https://www.youtube.com/embed/YABfT45J1ak" frameborder="0" allowfullscreen></iframe>

<p>One of the most iconic songs ever played by Metallica is the ballad <cite> Nothing Else Matters </cite>. Kirk Hammett took
    the stage alone for the intro while the rest of the band joined in later. The harmonies were perfect, and the lights
    were a subdued mix of base colors. Overall, this was one of the best performances of the night.
</p>

</article>

</section>

<footer>
    <nav>
        <ul>
            <li><a href="#">Home</a></li>
            <li><a href="https://metallica.com/">Official Site</a></li>
            <li><a href="https://metallica.com/band/members">The Band</a></li>
            <li><a href="http://metbootlegs.com">Bootlegs</a></li>
            <li><a href="https://metallica.com/releases/albums">Albums</a></li>
            <li><a href="#">Contact Us</a></li>
            <li><a href="https://www.paypal.com/home">Donate</a></li>
        </ul>
    </nav>

</footer>

</body>

</html>





我的尝试:



我已经尝试将htm文件更改为html,看看是否有效。这只会调出冲击波盒,但内容却缺失了。 Jpgs也仍然缺失。也许它是jpg的一个索引问题,但它没有意义,它可以在本地工作但不在托管时。



What I have tried:

I've tried changing the htm file to html and see if that works. This merely brings up the shock wave box but the content is missing. The Jpgs are also still missing. Perhaps its an index problem with the jpg but doesn't make sense that it would work locally but not when hosted.

推荐答案

这是一个很容易修复但是只有你能做到,因为我们无法运行你的代码。您只需要查看源或右键单击空图像空间并查看它尝试加载的URL。然后确保你的图像在那里。
This is a pretty easy thing to fix but only you can do it because we can't run your code. You just need to view the source or right-click on the empty image space and see what url it is trying to load. Then make sure your images are there.


这篇关于托管时的JPG问题,但在本地工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆