Array_walk and scanfiles
Posted: Sun Jan 24, 2010 3:58 pm
Hi,
I am trying to create a serries of arrays, where there is an array for every folder listing the files in that folder, so far I have come up with this but it isn't working and keeps returning this error:

Any help will be greatly appreciated.
Thanks
Tsail
P.S.
This is the code I'm using:
Thanks
I am trying to create a serries of arrays, where there is an array for every folder listing the files in that folder, so far I have come up with this but it isn't working and keeps returning this error:
I think this is because of the order php is doing things but i have no idea how to fix itWarning: scandir(0.) [function.scandir]: failed to open dir: No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Warning: scandir() [function.scandir]: (errno 0): No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Warning: scandir(1..) [function.scandir]: failed to open dir: No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Warning: scandir() [function.scandir]: (errno 0): No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Warning: scandir(201) [function.scandir]: failed to open dir: No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Warning: scandir() [function.scandir]: (errno 0): No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Warning: scandir(302) [function.scandir]: failed to open dir: No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Warning: scandir() [function.scandir]: (errno 0): No error in \\NAS40ENT\domains\b\braindeadproductions.eu\user\htdocs\php_pages\galleries\2009.php on line 43
Any help will be greatly appreciated.
Thanks
Tsail
P.S.
This is the code I'm using:
Code: Select all
<?php
$dir = '../../Gallery/2009/';
$file = scandir($dir);
function scanfiles($value, $dir = '../../Gallery/2009/')
{scandir($dir . $value);
}
array_walk($file,"scanfiles");
?>