Welcome Guest, Not a member yet? Register   Sign In
To trim or not to trim / ? That's the question (CI_URI)
#2

[eluser]dirkpostma[/eluser]
This fix works for me:

Code:
<?php

class MY_URI extends CI_URI
{

  function MY_URI()
  {
    parent::__construct();
  }

  function uri_string()
  {
    // Make sure the result always starts with a /
    // no matter which CI version you use (1.7.2 or 2.0.0)
    $res = trim(parent::uri_string(), '/');
    return "/" . $res;
  }
}
?>


NB: Save this code in {your_application_path}/core/MY_URI.php (NOT in {your_application_path}/libraries didn't work for me)


Messages In This Thread
To trim or not to trim / ? That's the question (CI_URI) - by El Forum - 02-02-2011, 04:58 AM
To trim or not to trim / ? That's the question (CI_URI) - by El Forum - 02-02-2011, 05:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB