![]() |
wrong directory separator in file helper - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: wrong directory separator in file helper (/showthread.php?tid=13805) |
wrong directory separator in file helper - El Forum - 12-06-2008 [eluser]Unknown[/eluser] I was reading files from a directory but could not output the names of the files. So I looked in File_helper and the method get_file_info. There on line 294 the method is using '/' as a separator which does not match the separators in my windows-environment. So I chenged it to 'DIRECTORY_SEPARATOR' and then it worked. So is this not a bug? File_helper line 294: $fileinfo['name'] = substr(strrchr($file, '/'), 1); >>> $fileinfo['name'] = substr(strrchr($file, DIRECTORY_SEPARATOR), 1); |