![]() |
Image library & foreach - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Image library & foreach (/showthread.php?tid=19043) |
Image library & foreach - El Forum - 05-26-2009 [eluser]NetStranger[/eluser] i need to make thumbs for lots of images in the folder once... and i right this code : Code: $data = directory_map('./img/photo/'.$page); but it's not work correctly. when i load page, thumb makes for first picture ONLY! other pictures dont create thumb . Then i do refresh of the page and NEXT picture get its thumb BUT third - not... etc .Why ? where my mistake?? thanks Image library & foreach - El Forum - 05-26-2009 [eluser]Pascal Kriete[/eluser] The image library (and all other CI libraries), are only instantiated once. So calling the loader again will not change the config settings. Instead you'll want to use the initialize() and clear() functions: Code: $this->load->library('image_lib'); Image library & foreach - El Forum - 05-27-2009 [eluser]NetStranger[/eluser] thanx very much!!! Image library & foreach - El Forum - 05-27-2009 [eluser]Thorpe Obazee[/eluser] And the subsequent call to load the image library is also ignored. |