[eluser]kettch[/eluser]
I've got some code that gets a list of files in a particular directory that works perfectly on one production server (Linux). However, the exact same code on a development server (Windows) returns the file size and date but not the file name. On a third server in production (Linux) none of the file attributes come through. The code is:
Code:
$this->load->helper(array('file','directory'));
...
$filelist = directory_map('./images/photos/');
...
foreach($filelist as $file){
$fileinfo = get_file_info('./images/photos/' . $file, array('name','size','date'));
...
$content .= "<td>" . $fileinfo['name'] . "</td>\n";
$content .= "<td>" . round($fileinfo['size'] / 1024) . " KB</td>\n";
$content .= "<td>" . date("F j, Y, g:i a",$fileinfo['date']) . "</td>\n";
...
}
This is with CI 1.7.3. Any ideas?
Edit: I've checked the directory/file permissions on each of the directories, the two Linux servers are both 770 and the Windows server is full R/W.