CodeIgniter Forums

Full Version: codeigniter 3.1.10 index.php code is not concise
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
codeigniter 3.1.10 index.php code is not concise,duplicate code in many.
$application_folder = strtr(
rtrim($application_folder, '/\\'),
'/\\',
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
);
Why not deal with it in one place?
for example:
arr=[dir1,dir2,dir3];
foreach($arr as $k=>$v) {
$arr[$k]= strtr(
rtrim($v, '/\\'),
'/\\',
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
}
@hap2000,

If you have a suggestion, you could always go to github and do a PR for the next version.