ds355020 2016-08-23 11:38
浏览 40

php CodeIgniter中显示的空白页面

I am facing a very strange problem . Please help me.

I am using CodeIgniter framework. When i run the php code in browser then instead of showing views it displays nothing and when i echo any thing else in my controller then then it gets echoed.

when i see the source code by right clicking on page in Mozilla browser whloe source code is there but when i use the firebug to see the code the all code is there except body tag is blank.

FireBug Code:

<!DOCTYPE html>
<html lang="en">
<head>
<title>temp</title>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link type="text/css" rel="stylesheet" href="http://127.0.0.1/dawn/assets/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="http://127.0.0.1/dawn/assets/css/custom.css">
<script src="bootstrap-3.3.6/js/bootstrap.min.js">
</head>
<body>
</body> 
</html> 

Controller: home.php

<?php   
            defined('BASEPATH') OR exit('No direct script access allowed');
            class Home extends MY_Controller
            {
            public function index()
            {
            $this->load->view('home');
            }
            }
?>

View: home.php

            <?php 
            echo require_once('header.php');


            ?>
            <div class="container-fluid text-center col-sm-6 bg-1">
            <?php echo anchr('student/index', '<h1>Student</h1>'); ?>
            <?php 
            $image_properties = array(
            'src'   => 'assets/img/sun.jpg',
            'alt'   => 'Logo',
            'class' => 'img-circle',
            'width' => '150',
            'height'=> '150',
            'title' => ' ',
            'rel'   => ''
            );
            echo img($image_properties);
            ?>
            <h3>Fulfill Your Dreams of Education in Abroad.</h3>
            </div>
            <div class="container-fluid text-center col-sm-6 bg-1">
            <a  href="#">
            <h1>Institution</h1>
            <?php 
            $image_properties = array(
            'src'   => 'assets/img/sun.jpg',
            'alt'   => 'Logo',
            'class' => 'img-circle',
            'width' => '150',
            'height'=> '150',
            'title' => ' ',
            'rel'   => ''
            );
            echo img($image_properties);
            ?>
            <h3>Fulfill Your Dreams of Education in Abroad.</h3>
            </a>
            </div>
            <div class="container-fluid text-center col-sm-6 bg-1">
            <a  href="#">
            <h1>Fun Buddies</h1>
            <?php 
            $image_properties = array(
            'src'   => 'assets/img/sun.jpg',
            'alt'   => 'Logo',
            'class' => 'img-circle',
            'width' => '150',
            'height'=> '150',
            'title' => ' ',
            'rel'   => ''
            );
            echo img($image_properties);
            ?>
            <h3>Fulfill Your Dreams of Education in Abroad.</h3>
            </a>
            </div>
            <div class="container-fluid text-center col-sm-6 bg-1">
            <a  href="#">
            <h1>Counselling</h1>
            <?php 
            $image_properties = array(
            'src'   => 'assets/img/sun.jpg',
            'alt'   => 'Logo',
            'class' => 'img-circle',
            'width' => '150',
            'height'=> '150',
            'title' => ' ',
            'rel'   => ''
            );
            echo img($image_properties);
            ?>
            <h3>Fulfill Your Dreams of Education in Abroad.</h3>
            </a>
            </div>  

            <?php echo include('footer.php'); ?>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示
    • ¥15 求三国群英传pl国战时间的修改方法
    • ¥15 matlab代码代写,需写出详细代码,代价私
    • ¥15 ROS系统搭建请教(跨境电商用途)
    • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。