2016-02-06 273 views
0

代碼在xampp的本地主機上完美工作。我所做的所有事情都是上傳到服務器,現在不起作用。 我也上傳了所有的BS文件。我也修復了href鏈接爲'..../js/bootstrap.min.js'等。沒有圖像加載,也沒有bootstrap我不認爲。我認爲這個問題來自Bootstrap的原因是因爲所有的文本/按鈕仍然出現,它們只是沒有像BS那樣用css/JS自定義。
他們是PHP文件。Bootstrap在本地主機上工作,但不在在線服務器上

這是一個鏈接到站點:http://www.johnnythyroid.com。 我只是新的,這只是爲了學習,所以所有的建議非常感謝。

這是相關的代碼,我想,我刪除了許多愚蠢的文字把它縮短:

<!DOCTYPE html> 
 
<html lang="en"> 
 
    <head> 
 
    <meta charset="utf-8"> 
 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> 
 
    <title>Jod</title> 
 

 
    <!-- Bootstrap --> 
 
\t <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> 
 
\t <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> 
 
\t <link rel='stylesheet' type='text/css' href="johnnythyroidcom.ipage.com/css/custom icons.css"> 
 
\t <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> 
 
\t <link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'> 
 
\t 
 
    
 
\t \t 
 
\t <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> 
 
    <!-- Include all compiled plugins (below), or include individual files as needed --> 
 
    <script src="johnnythyroidcom.ipage.com/js/bootstrap.min.js"></script> 
 

 
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 
 
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 
 
    <!--[if lt IE 9]> 
 
     <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 
 
     <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
 
    <![endif]--> 
 
    </head> 
 
    <body> 
 
\t <div class="navbar navbar-custom navbar-fixed-top" role="navigation"> 
 
\t \t <div class="container"> 
 
\t \t \t <div class="navbar-header"> 
 
\t \t \t \t <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
 
\t \t \t \t \t <span class="sr-only"> Navbar toggle </span> 
 
\t \t \t \t \t <span class="icon-bar"></span> 
 
\t \t \t \t \t <span class="icon-bar"></span> 
 
\t \t \t \t \t <span class="icon-bar"></span> 
 
\t \t \t \t </button> 
 
\t \t \t \t <a class="navbar-brand" href="johnnythyroidcom.ipage.com/dansite1.php">Some Name</a> 
 
\t \t \t </div> 
 
\t \t \t <div class="navbar-collapse collapse" style="line-height:21px; height:140px;"> <!-- added this to prevent change of navbar height when switching between login/logout screens --> 
 
\t \t \t \t <ul class="nav navbar-nav navbar-right"> 
 
\t \t \t \t \t <li class="active"><a href="johnnythyroidcom.ipage.com/dansite1.php">Home</a></li> 
 
\t \t \t \t \t <li><a href="johnnythyroidcom.ipage.com/About.php">About</a></li> 
 
\t \t \t \t \t <li><a href="#contact" data-toggle="modal">Contact</a></li> 
 
\t \t \t \t \t <li class="dropdown"> 
 
\t \t \t \t \t \t <a href="#" class="dropdown-toggle" data-toggle="dropdown">Account<b class="caret"></b></a> 
 
\t \t \t \t \t \t <ul class="dropdown-menu"> 
 
\t \t \t \t \t \t \t <li class="dropdown-header"></li> 
 
\t \t \t \t \t \t \t <li><a href="#accountLogin" data-toggle="modal">Login</a></li> 
 
\t \t \t \t \t \t \t <li><a href="#accountCreate" data-toggle="modal">Create Account</a></li> 
 
\t \t \t \t \t \t \t <!-- <li class="divider"></li> 
 
\t \t \t \t \t \t \t <li class="dropdown-header">Portfolio</li> 
 
\t \t \t \t \t \t \t <li><a href="#">Portfolio 1</a></li> 
 
\t \t \t \t \t \t \t <li><a href="#">Portfolio 2</a></li> add divider to split up a drop down menu --> 
 
\t \t \t \t \t \t </ul> 
 
\t \t \t \t \t </li> 
 
\t \t \t \t \t <li class="navbar-text pull-right signedin"> Welcome, Guest! </li> \t \t \t \t 
 
\t \t \t \t </ul> 
 
\t \t \t </div> 
 
\t \t </div> 
 
\t </div> 
 
\t 
 
\t <div class="container"> 
 
\t \t <div class="jumbotron text-center"> 
 
\t \t \t <h1> The </h1> 
 
\t \t \t <p> A simgn </p> 
 
\t \t \t <a href="#" class="btn btn-primary"> Bg </a> 
 
\t \t \t <a href="#" class="btn btn-success"> ng</a> 
 
\t \t </div> 
 
\t \t <div class="row-same-height"> 
 
\t \t \t <div class="col-md-4"> <!-- works on a 12 point grid system - columns need to add up to 12 in a row--> 
 
\t \t \t \t \t <a href="johnnythyroidcom.ipage.com/rocket.php" class="thumbnail home-thumb"> 
 
\t \t \t \t \t \t <img src="johnnythyroidcom.ipage.com/Img/first rocket.jpg" style="max-height:250px" alt="First rocket theme"/> 
 
\t \t \t \t \t </a> 
 
\t \t \t \t \t <h3> Rjj </h3> 
 
\t \t \t \t \t <p>sum dolor sit amet.</p> 
 
\t \t \t </p> 
 
\t \t \t \t \t <a href="johnnythyroidcom.ipage.com/rocket.php" class="btn btn-danger">View more</a> 
 
\t \t \t </div> 
 
\t \t \t <div class="col-md-4"> <!-- works on a 12 point grid system - columns need to add up to 12 in a row--> 
 
\t \t \t \t \t <a href="johnnythyroidcom.ipage.com/stars.php" class="thumbnail home-thumb"> 
 
\t \t \t \t \t \t <img src="johnnythyroidcom.ipage.com/Img/sky.jpg" style="max-height:250px" alt="sky theme"/> 
 
\t \t \t \t \t </a> 
 
\t \t \t \t \t <h3> Ss </h3> 
 
\t \t \t \t \t <p>Lorenim.</p> 
 
\t \t \t \t \t <a href="johnnythyroidcom.ipage.com/stars.php" class="btn btn-danger">View more</a> 
 
\t \t \t </div> 
 
\t \t \t <div class="col-md-4"> <!-- works on a 12 point grid system - columns need to add up to 12 in a row--> 
 
\t \t \t \t \t <a href="johnnythyroidcom.ipage.com/sky.php" class="thumbnail home-thumb"> 
 
\t \t \t \t \t \t <img src="johnnythyroidcom.ipage.com/Img/stars.jpg" style="min-height:227px" alt = "Star theme"/> 
 
\t \t \t \t \t </a> 
 
\t \t \t \t \t <h3> y </h3> 
 
\t \t \t \t \t <p>Lorenim.</p> 
 
\t \t \t \t \t <a href="johnnythyroidcom.ipage.com/sky.php" class="btn btn-danger">View more</a> 
 
\t \t \t </div> 
 
\t \t </div> 
 
\t </div> 
 
\t 
 
\t 
 
\t <div class="navbar navbar-inverse navbar-fixed-bottom" role="navigation"> 
 
\t \t <div class="container"> 
 
\t \t \t <div class="navbar-text pull-left"> 
 
\t \t \t \t <p> aaaaaa </p> 
 
\t \t \t </div> 
 
\t \t \t <div class="navbar-text pull-right"> 
 
\t \t \t \t <a href="#"><i class="fa fa-facebook-square fa-2x"></i></a> 
 
\t \t \t \t <a href="#"><i class="fa fa-twitter fa-2x"></i></a> 
 
\t \t \t \t <a href="#"><i class="fa fa-google-plus fa-2x"></i></a> 
 
\t \t \t </div> 
 
\t \t </div> 
 
\t </div>

+0

會出現這個權利?它看起來像是在bootstrap.min.js中有一個完整的html文檔:http://www.johnnythyroid.com/johnnythyroidcom.ipage.com/js/bootstrap.min.js – Reflexorozy

回答

2

試試這個 變化

<img src="johnnythyroidcom.ipage.com/Img/first rocket.jpg" style="max-height:250px" alt="First rocket theme"> 

<img src="http://johnnythyroidcom.ipage.com/Img/first rocket.jpg" style="max-height:250px" alt="First rocket theme"> 

添加http://你的所有圖像的src

+0

謝謝你的解決方案。 – Pwnerface

+0

僅供參考,'First rocket theme'也可以。我會去相對路徑,而不是絕對路徑.. – Rayon

2

檢查console錯誤。

它說,引導的JavaScript需要jQuery的,正如我看得出,你已經包括它,它加載正確。在包含之前包含該文件bootstrap.min.js

還糾正圖像的路徑。您的請求網址變爲:http://www.johnnythyroid.com/johnnythyroidcom.ipage.com/Img/first%20rocket.jpg這是不正確的。

注:只是一個盲目的猜測,不正確的路徑可能是因爲.htaccess

+0

非常感謝人造絲。我真的不知道控制檯檢查錯誤的方式。對於看着你的任何人,只需按f12我相信。 問題出在我按照方式連接的方式,你和Saranga都指出了。 Saranga的解決方案是正確的,只需在鏈接中添加'http://'即可。這必須爲我的所有我的href不只是img src。不知道,如果這是有道理的,但它可能有助於某人。 – Pwnerface

相關問題