Bootstrap切换导航和AJAX在Localhost上工作,但不在webhosting中,而不在我的计算机上工作

时间:2015-07-02 09:13:04

标签: php jquery ajax twitter-bootstrap

请帮助我,

我的网站(PHP)上的某些功能在服务器上运行不正常,当我将我的网站文件复制到新目录时,它也无法正常工作。当我试图上传到数据库时,它也无法正常工作。

 <!-- Navigation -->
    <div id="cont-banner">
        <div id="banner">
        <a href="index.php">
        <img class="banner-image" src="image/<?PHP setBrand();?>" alt="">
        </a>
        </div>
    </div>
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container" id="navigation-cont">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.php"><img class="img-navbar" src="image/homebuttonmerged.png" alt=""></a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                      <a href="jobs.php" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" id="nav-jobs">Jobs <span class="caret"></span></a>
                      <ul class="dropdown-menu" role="menu">
                        <li><a href="foto.php">photo</a></li>
                        <li><a href="video.php">video</a></li>
                        <li><a href="survey.php">survey</a></li>
                        <li><a href="game.php">game</a></li>
                      </ul>
                    </li>
                </ul>
                <form action="search.php" method="GET" class="navbar-form navbar-left" role="search" id="nav-form">
                <div class="form-group">
                    <div class="icon-addon addon-lg">
                    <input type="text" id="q" name="q" placeholder="search" class="form-control" id="Search">
                    <a href="#"><label for="Search" class="glyphicon glyphicon-search" rel="tooltip" title="Search"></label></a>
                    </div>  
                </div>
                </form>
                <ul class="nav navbar-nav navbar-right">
                <li><a href="help.php">Bantuan</a></li>

                <?php
                $ID = $_SESSION['username'];
                $sql = mysql_query("select partimer.fname from partimer where partimer.username = '$ID' OR partimer.email = '$ID'");
                $result=mysql_fetch_array($sql);

                if (empty($_SESSION['username']) AND empty($_SESSION['passuser'])){
                  echo"
                  <li><a href='#'><img src='image/email.png' alt='' id='li-mail'></a></li>
                  <li class='dropdown' id='li-log'>
                  <a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-expanded='false'>login <span class='caret'></span></a>
                  <ul class='dropdown-menu' role='menu' id='drop-log'>
                    <form class='navbar-form navbar-left' action='cek-login.php' method='post'>
                      <div class='form-group'>
                        <input type='text' class='form-control' id='log-control' placeholder='username or email' name='username'>
                        <input type='password' class='form-control' id='log-control' placeholder='password' name='password'>
                      </div>
                      <button type='submit' class='btn btn-default' id='btn-log'>login</button>
                    </form>
                    <li><a href='#'><p class='a-log'>Forgot Password?</p></a></li>
                    <p class='p-log'>Don't have an account?<BR>Please <a class='a-log' href='register/index.html'>Sign Up</a>. Free.</p>

                  </ul>
                </li>
                <li id='break-li'><span></span></li>
                <li><a href='register/index.html'>register</a></li>
                ";

                }
                else{
                echo"
                <li style='margin-top: 0px;'><a href='profile-message.php'><img src='image/email.png' alt='' id='li-mail'>".$ReturnNTFC."</a></li>
                <li class='dropdown' id='li-log'>
                  <a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-expanded='false'>Hello ".$result['fname']."<span class='caret'></span></a>
                  <ul class='dropdown-menu' role='menu' id='drop-log2'>

                    <li><a href='profile-phone.php'><p class='b-log'>My Account</p></a></li>
                    <li><a href='profile.php'><p class='b-log'>Edit Profile</p></a></li>
                    <li><a href='profile-message.php'><p class='b-log'>Message</p></a></li>
                    <li><a href='profile-timeline.php'><p class='b-log'>My Job</p></a></li>
                    <li><a href='profile-saldo.php'><p class='b-log'>Total Saldo</p></a></li>
                    <li><a href='logout.php'><p class='b-log'>Log Out</p></a></li>

                  </ul>
                </li>
                ";
                }
                ?>
                <!--
                <li class="dropdown" id="li-log">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">login <span class="caret"></span></a>
                  <ul class="dropdown-menu" role="menu" id="drop-log">
                    <form class="navbar-form navbar-left" action="cek-login.php" method="post">
                      <div class="form-group">
                        <input type="text" class="form-control" id="log-control" placeholder="username or email" name="username">
                        <input type="password" class="form-control" id="log-control" placeholder="password" name="password">
                      </div>
                      <button type="submit" class="btn btn-default" id="btn-log">login</button>
                    </form>
                    <li><a href="#"><p class="a-log">Forgot Password?</p></a></li>
                    <p class="p-log">Don't have an account?<BR>Please <a class="a-log" href="register/index.html">Sign Up</a>. Free.</p>

                    <!--
                    <li><a href="#">Action</a></li>
                    <li><a href="#">Another action</a></li>
                  </ul>
                </li>
                <li id="break-li"><span></span></li>
                <li><a href="register/index.html">register</a></li>-->
              </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container -->
    </nav>

 ...

 <!-- Ajax Timeline Here! -->
 <div class="col-md-12 scroll-time" id="timeline">
     <div id="wrap">

    </div>
 </div>

我使用http://www.inserthtml.com/2013/01/scroll-pagination/

请帮帮我。

0 个答案:

没有答案