Welcome Guest, Not a member yet? Register   Sign In
problem with debug bar
#1

i found the below issue:

While the environment is set to development the page is not rendered correctly using the below URLs:

- http://local.site/home
- http://local.site/home/index

The Debug Toolbar is opened up by default however i can't click on any of the buttons.
If i look at the page source the expected data is there in the source.

However, the below URL will work:

http://local.site/home/index/anything_here

When i switch the environment to production, without the debug bar, everything works fine.


PHP Code:
<?php namespace App\Controllers;

use 
CodeIgniter\Controller;

class 
Home extends Controller {

 
   public $db;

 
   public function __construct(...$params) {
 
       parent::__construct(...$params);
 
       $this->db = \Config\Database::connect();
 
       helper('url');
 
   }
 public function 
index($tbl NULL) {

 
       $tables $this->db->listTables();
 
       $data['content']['tables'] = $tables;


 
       if ($tbl !== NULL)
 
       {
 
           $fields $this->db->getFieldNames($tbl);
 
           $data['content'][$tbl] = $fields;
 
       } else
 
       {
 
           $fields $this->db->getFieldNames('zz_settings');
 
           $data['content']['zz_settings'] = $fields;
 
       }

 
        echo '<pre>';
 
        print_r($data);
 
        echo '</pre>';
 
   }

Reply




Theme © iAndrew 2016 - Forum software by © MyBB