douju5933 2017-07-14 19:44
浏览 99
已采纳

包含PHP标签后导航栏没有折叠

I just include this php tags just to check,that if the user is logged in or not.The modal is located in other page(login.php) . It was working fine without including the php tags."The whole thing is working fine except the navbar is not collapsing".Rate +ve if the question is not irrelevant.

          <div class="navbar-header">
          <button class="navbar-toggle" data-toggle="collapse" data-target=".collmenu"> 
             <span class="icon-bar img-reponsive"></span>
             <span class="icon-bar img-reponsive"></span>
             <span class="icon-bar img-reponsive"></span>
         </button>
      </div>
      <div class="collapse navbar-collapse collmenu">

            <ul class="nav navbar-nav navbar-right">
         <?php
         if(!empty($loggedin)&&($loggedin=='true')){ echo'<li><a href="">logout</a></li>
               <li><a href="#">hello</a></li>';}

            else{echo'<li><a href="" data-toggle="modal" data-target="#loginmodal">Login</a></li>
                 <li><a href="pages/register.php">Signup</a></li>';}

        ?>  
            </ul>

  </div>
  • 写回答

1条回答 默认 最新

  • dpvp56187 2017-07-14 20:52
    关注

    Please check for the files that you've included. Or is there any form exists in your this page linked to the navbar? check that you should not have included files twice, also check for the form action if any.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 vue2登录调用后端接口如何实现