• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
codeigniter 3.1.10 index.php code is not concise

#1
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
}
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.