呆萌呆萌程序员 发表于 2015-10-7 14:21:31

CI载入视图部分html代码会隐藏消失的问题~~~~郁闷中

本帖最后由 呆萌呆萌程序员 于 2015-10-8 23:37 编辑

我是一个小白,但是我遇到了一个从来都没有见过的神奇BUG,我用CI载入视图,一开始还都能显示出来,等我把页面写好在wampsever里运行的时候有一部分html代码能显示,部分html不能显示。
想来想去想不通,我觉得HTML只是标记语言应该不是html的问题。我猜测是CI的问题。这个问题让我夜不能寐,求大神解答!!感激不尽呐!情况如下图所示,直接打开前端html,会显示所有的选项,用CI载入CSS,和JavaScript以后下面慕课ID以后的代码就会被隐藏,显示不出来了。


我上传的论坛图片还没有审核通过,现在发不出来图片。我的qq是1203669692,求路过的大神加我QQ,真的是万分感谢,郁闷好几天了。
      

就是这两个图,代码是一样的,用ci 的$this->load->view(),以前载好多次,第一次出现这种情况,请大家帮忙看看是哪里的问题

666 发表于 2015-10-12 11:25:25

哈哈。php你忘了;吧

呆萌呆萌程序员 发表于 2015-10-12 00:44:09

<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'style/' ?>css/common.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo base_url() . 'style/' ?>css/main.css"/>
    <script type="text/javascript" src="<?php echo base_url() . 'style/' ?>js/libs/modernizr.min.js"></script>

   <style type="text/css">
   span {
      color: #f00;
   }
    </style>
</head>
<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
      <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li>新慕客注册</li>
            
            </ul>
      </div>
      <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="<?php echo site_url('login/login_out') ?>">退出</a></li>
            </ul>
      </div>
    </div>
</div>

    <!--/sidebar-->
   
      <div class="result-wrap">
            <div class="result-content" >
                   <form action="<?php echo site_url('Login/rdone') ?>" method="post" id="" name="changed" enctype="multipart/form-data">
                  <table class="insert-tab" width="100%">
                        <tbody>
                            <tr>
                              <th><i class="require-red">*</i>友情提示</th>
                              <td>
                                    如果没有慕客ID请联系小唐美眉
                              </td>
                            </tr>
                           <tr>
                              <th><i class="require-red">*</i>慕客ID:</th>
                              <td>
                                    <input class="common-text required" id="title" name="moocid" size="25" value="" type="text">
                                  <?php echo form_error('moocid','<span>','</span>') ?>
                              </td>
                            </tr>
                            <tr>
                              <th><i class="require-red">*</i>中文名字:</th>
                              <td>
                                    <input class="common-text required" id="" name="username" size="25" value="" type="text">
                                 <?php echo form_error('username','<span>','</span>') ?>
                              </td>
                            </tr>
                            <tr>
                              <th><i class="require-red">*</i>您的密码:</th>
                              <td><input class="common-text" name="passwdf" size="25" value="" type="password">
                                     <?php echo form_error('passwdf','<span>','</span>') ?>
                              </td>
                            </tr>
                            <tr>
                                 <th><i class="require-red">*</i>确认密码:</th>
                              <td>
                                    <input class="common-text required"name="passwds" size="25" value="" type="password">
                                     <?php echo form_error('passwds','<span>','</span>') ?>
                              </td>
                            </tr>
                            <tr>
                              <th></th>
                              <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                              </td>
                            </tr>
                        </tbody>
                  </table>
                </form>
            </div>
      </div>

   
    <!--/main-->
</div>

</body>
</html>

sk811229 发表于 2015-12-9 09:39:13

亲 你嵌入的php代码好像有问题吧
最后都有个,'')?>
<?php echo site_url('login/login_out') ?>
<?php echo site_url('Login/rdone') ?>
。。。
好像每个php语句都没有分号 ; 正确结束啊。
你要不想要分号就用替代语法吧。

一叶扁舟 发表于 2015-10-8 09:23:31

:L 要不上代码,要不上图……

Hex 发表于 2015-10-8 11:04:11

楼主重新发一下图吧~

呆萌呆萌程序员 发表于 2015-10-8 23:39:59

一叶扁舟 发表于 2015-10-8 09:23
要不上代码,要不上图……

图已经上传了,就是载入视图后,后面的那几项中文名字,输入密码等,下面的html代码都失效了。。。

呆萌呆萌程序员 发表于 2015-10-8 23:40:32

Hex 发表于 2015-10-8 11:04
楼主重新发一下图吧~

图已经上传了,就是载入视图后,后面的那几项中文名字,输入密码等,下面的html代码都失效了。。。

一叶扁舟 发表于 2015-10-9 09:00:20

表单每一行最后都有个,'')?>
应该是你标签用的有误

666 发表于 2015-10-10 14:13:22

css路径问题吧

呆萌呆萌程序员 发表于 2015-10-12 00:46:52

一叶扁舟 发表于 2015-10-9 09:00
表单每一行最后都有个,'')?>
应该是你标签用的有误

代码我发出来了,我没有发现代码哪里错了,帮忙看一下

呆萌呆萌程序员 发表于 2015-10-12 00:48:15

666 发表于 2015-10-10 14:13
css路径问题吧

如果是路径的问题,应该都不显示才对,不应该一部分显示,一部分不显示吧,所以这个可以排除
页: [1] 2
查看完整版本: CI载入视图部分html代码会隐藏消失的问题~~~~郁闷中