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'); ?>