Welcome Guest, Not a member yet? Register   Sign In
Using file helper get_filenames() is very buggy for me
#1

[eluser]Ian Beck[/eluser]
I'm having a rather major problem using the file helper's get_filenames() function.

The first time I use it things work fine. If I use it a second time, the results it returns are the first results, followed by the second results. For example:

Dir1 contains the files File1 and File2.
Dir2 contains the files File3 and File4.
My site has index.php, Dir1, and Dir2 all in the root folder.

I run:

$first_files = get_filenames('./Dir1/');
$second_files = get_filenames('./Dir2/');

$first_files ends up being:
Array( 0 => 'File1', 1 => 'File2' )

$second_files ends up being:
Array( 0 => 'File1', 1 => 'File2', 2 => 'File3', 3 => 'File4' )

I've double checked the default file_helper.php, but it looks fine (should be rewriting the array that it returns every time it gets called).

I'm running PHP 4.x, CodeIgniter 1.5.4, and the helper is being called from within a Matchbox module.

Any ideas what the heck might be going wrong and how I can fix it?


Messages In This Thread
Using file helper get_filenames() is very buggy for me - by El Forum - 01-03-2008, 08:18 PM
Using file helper get_filenames() is very buggy for me - by El Forum - 01-03-2008, 09:58 PM
Using file helper get_filenames() is very buggy for me - by El Forum - 01-03-2008, 11:31 PM
Using file helper get_filenames() is very buggy for me - by El Forum - 01-04-2008, 06:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB