I\'m thinking about developing my own PHP based gallery for storing lots of pictures, maybe in the tens of thousands.
At the database I\'ll point to the url of the i
I am currently facing this problem, and what Isaac wrote got me interested in the idea. Tho my function differs a little.
function _getFilePath($id) {
$id = sprintf("%06d", $id);
$level = array();
for($lvl = 3; $lvl >= 1; $lvl--)
$level[$lvl] = substr($id, (($lvl*2)-2), 2);
return implode('/', array_reverse($level)).'.jpg';
}
My images are only in thousands so i only have this up to 999999 limit and so it would split that into 99/99/99.jpg or 43524 into 04/35/24.jpg