• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add error

#1
http://127.0.0.1/CompanyGiondaCI/index.p...tctgcreate


Warning: include(C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php): failed to open stream: No such file or directory in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269

Warning: include(): Failed opening 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php' for inclusion (include_path='.;C:\php\pear') in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269

Warning: include(C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php): failed to open stream: No such file or directory in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269

Warning: include(): Failed opening 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php' for inclusion (include_path='.;C:\php\pear') in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269

Hello,

I am trying to add this data to views/addparentctg.php

PHP Code:
<div class="row-fluid">
                <
div class="span12">
                    
                    
                    <
div class="widget-box">
                        <
div class="widget-title"><h5>Parent Categories</h5></div>
                        <
div class="widget-content">
                        
                        <?
php $this->load->library('form_validation'); ?>
                        
                        <?php echo validation_errors(); ?>
                        
                        <?php echo form_open('cpages/addparentctgcreate'); ?>
                        <table border="0" style="width: 80%; height: 90px;">
                            <tr>
                                <td>PARENT NAME</td>
                                <td><input type="text" name="ctgname"></td>
                            </td>
                            <tr>
                                <td>DESCRIPTION</td>
                                <td><input type="text" name="ctgdescription"></td>
                            </td>    
                            <tr>
                                <td></td>
                                <td><input type="submit" class="edit" name="submit" value="SUBMIT" /></td>
                            </td>    
                        </table>
                        </form>
                        </div>
                    </div>                    
                </div>
            </div> 


controllers/cpages.php

PHP Code:
class Cpages extends CI_Controller {

    /**
     * Index Page for this controller.
     *
     * Maps to the following URL
     *         http://example.com/index.php/welcome
     *    - or -
     *         http://example.com/index.php/welcome/index
     *    - or -
     * Since this controller is set as the default controller in
     * config/routes.php, it's displayed at http://example.com/
     *
     * So any other public methods not prefixed with an underscore will
     * map to /index.php/welcome/<method_name>
     * @see https://codeigniter.com/user_guide/general/urls.html
     */
    
    public 
function __construct()
    {
        parent::__construct();
        
        $this
->load->helper('url');
        $this->load->helper('url_helper');
        $this->load->helper('form');
        
        $this
->load->library('form_validation');
    }


public function 
addparentctgcreate() {
        
        
        
/*
        $this->form_validation->set_rules('ctgname', 'Category Name', 'required');
        $this->form_validation->set_rules('ctgdescription', 'Category Description', 'required');
        */
        
if($this->form_validation->run() === FALSE)
        {
            
$this->load->view('cpages/addparentctgcreate');
        }
        else
        {
            
$this->mpages->set_parentctg();
            
$this->load->view('cpages/addparentctgsuccess');
        }    
        
    } 


models/mpages.php

PHP Code:
class Mpages extends CI_Controller {


    public function 
__construct()
    {
        
parent::construct();
        
        
    }

    public function 
set_parentctg()
    {
    
 
   $data = array(
        
'ctgname' => $this->input->post('parent_name');
        
'ctgdescription' => $this->input->post('description')
    );
    
    return 
$this->db->insert('menu'$data);    
    
    }






How to fix the error so that I can add new menu for parent category smoothly?

Thanks in advance.
" If I looks more intelligence please increase my reputation."
Reply

#2
Why are you loading a library in a view?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
I have no choice otherwise this:

                    
PHP Code:
   <?php echo validation_errors(); ?>


Will turns into new error message.  Any other clue or suggestion?
" If I looks more intelligence please increase my reputation."
Reply

#4
(07-02-2016, 09:22 AM)davy_yg Wrote: I have no choice otherwise this:

                    
PHP Code:
   <?php echo validation_errors(); ?>


Will turns into new error message.  Any other clue or suggestion?
But you already load in controller constructor $this->load->library('form_validation')
Keep calm.
Reply

#5
PHP Code:
Warning: include(C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php): failed to open streamNo such file or directory in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269

Warning
: include(): Failed opening 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php' for inclusion (include_path='.;C:\php\pear'in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269

Warning
: include(C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php): failed to open streamNo such file or directory in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269

Warning
: include(): Failed opening 'C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php' for inclusion (include_path='.;C:\php\pear'in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\system\core\Exceptions.php on line 269 

The problem is file C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyGiondaCI\application\views\errors\html\error_php.php does not found.
Keep calm.
Reply

#6
I add the error folder:

This is my new error:

http://127.0.0.1/CompanyGiondaCI/index.p...tctgcreate

An Error Was Encountered
Unable to load the requested file: cpages/addparentctgcreate.php
" If I looks more intelligence please increase my reputation."
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.