[eluser]rash[/eluser]
Hello all,
I am new in mvc format of php. I want to know that why my index page of the project folder is displayed blank.
Controller code of the index is:
<?php
class Index extends Controller {
function __construct() {
parent::__construct();
}
function index() {
$this->view->uploadlist = $this->model->uploadList();
$this->view->otherlist = $this->model->uploadotherList();
$this->view->render('index/index');
}
}
-----------------------
and model code for index page is:
<?php
class Index_Model extends Model
{
public function __construct()
{
parent::__construct();
}
public function uploadList(){
return $this->db->select('SELECT * FROM slide_content');
}
public function uploadotherList(){
return $this->db->select('SELECT * FROM slide_other ORDER BY slide_other_id ASC LIMIT 1');
}
}
----------
And view code for index is:
<div class="panel">
<div id="featured_slide">
<div id="slider">
<ul id="categories">
<?php
foreach($this->uploadlist as $key => $value) {
?>
<li class="category">
<h2><?php echo $value['sheading']; ?></h2>
<a href="<?php echo $value['slink'];?>"><img src="<?php echo URL; ?>public/images/fslider/<?php echo $value['simage'];?>" alt="" /></a>
<p><?php echo $value['scontent']; ?></p>
<p class="readmore"><a href="<?php echo $value['page_link'];?>">Read More »</a></p>
</li>
<?php } ?>
<li class="category">
<h2><?php echo $this->otherlist[0]['oheading']; ?></h2>
<a href="<?php echo $this->otherlist[0]['olink']; ?>"><img src="<?php echo URL; ?>public/images/others/<?php echo $this->otherlist[0]['oimage']; ?>" alt="" /></a>
<p><?php echo $this->otherlist[0]['ocontent']; ?></p>
<p class="readmore"><a href="<?php echo URL;?>others">Read More »</a></p>
</li>
</ul>
<a class="prev disabled"></a> <a class="next disabled"></a>
<div ></div>
</div>
</div>
</div>
In this When i type "http://localhost/Prameya_mvc/" like this it will show the blank page, but if i type"http://localhost/Prameya_mvc/index" like this it will show the correct page.....
Plz can anyone help me to solve this proble, i didn't understand why it causes....but i want when i type "http://localhost/Prameya_mvc/" it will show the correct page not blank...
Thanks for any suggetion...