The requested URL was not found on this server. on php codeigniter -
i beginner codeigniter , trying make inventory system , dashboard ready , when click button on dashboard gives error, not loading newproduct view defined routes tried no +ve result
here controller
<?php defined('basepath') or exit('no direct script access allowed'); class dashboard extends ci_controller { public function _construct(){ parent::_construct(); $this->load->database(); $this->load->model("m_inventory"); $this->load->helper('form'); $this->load->library('form_validation');} public function add_items(){ $this->load->view('newproduct');}
and dashboard view
<div class="form"> <h2>inventory system</h2> <div class="button1"> <a title="new account" href='<?php echo base_url ('dashboard/add_items'); ?>new product</a> </div> <div class="button2"> <input type="submit" name="submit" value="current stock" > </div> </div>
- confirm if url helper loaded in application/config/autoload.php since using base_url()
- your view file name should newproduct.php
- check adding/removing index.php after base url.
if above doesn't share error getting , ci version.
Comments
Post a Comment