Welcome Guest, Not a member yet? Register   Sign In
Issue with trailing slash in form_open() and other functions
#1

[eluser]Unknown[/eluser]
I have more sophisticated requirements to trailing slash in URL. Some of my pages must be with trailing slash, some of the pages without. So using $config['url_suffix'] is not an option for me.

Currently I have applied following fixes \system\core\URI.php line 222:
Code:
return str_replace(array('//', '../'), '/', ltrim($uri, '/'));

And \system\core\Config.php line 302:
Code:
$uri = ltrim($uri, '/');

I have just changed trim() to ltrim(). And it now works good as excepted. I'm using CodeIgniter 2.1.2 and after updating to next CodeIgniter my changes will be disappeared. What should I do?
#2

[eluser]CroNiX[/eluser]
Read the user guide on extending core classes?

That's its main purpose: to be able to extend or alter the core functionality without actually changing core files.




Theme © iAndrew 2016 - Forum software by © MyBB