Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The source of your problem is in the Core Config.php file where the CI_Config class resides. The method site_url() is used by the form helper when you are trying to use form_open function. Solution would be to override this class with your own. If you are using CI &lt; 2.0 then create your extended class in application/libraries/MY_Config.php, otherwise if CI >= 2.0 then your extended class goes to application/core/MY_Config.php. Then you need to redefine the method site_url().</p> <pre> class MY_Config extends CI_Config { function __construct() { parent::CI_Config(); } public function site_url($uri='') { //Copy the method from the parent class here: if ($uri == '') { if ($this->item('base_url') == '') { return $this->item('index_page'); } else { return $this->slash_item('base_url').$this->item('index_page'); } } if ($this->item('enable_query_strings') == FALSE) { //This is when query strings are disabled } else { if (is_array($uri)) { $i = 0; $str = ''; foreach ($uri as $key => $val) { $prefix = ($i == 0) ? '' : '&'; $str .= $prefix.$key.'='.$val; $i++; } $uri = $str; } if ($this->item('base_url') == '') { //You need to remove the "?" from here if your $config['base_url']=='' //return $this->item('index_page').'?'.$uri; return $this->item('index_page').$uri; } else { //Or remove it here if your $config['base_url'] != '' //return $this->slash_item('base_url').$this->item('index_page').'?'.$uri; return $this->slash_item('base_url').$this->item('index_page).$uri; } } } } </pre> <p>I hope this helps and I think you are using CI 2.0 that wasn't officially released, this was removed in the official CI 2.0 version</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload