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> 

  1. confirm if url helper loaded in application/config/autoload.php since using base_url()
  2. your view file name should newproduct.php
  3. check adding/removing index.php after base url.

if above doesn't share error getting , ci version.


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -