![]() |
Problem with image lib and dynamic output - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with image lib and dynamic output (/showthread.php?tid=11395) |
Problem with image lib and dynamic output - El Forum - 09-07-2008 [eluser]Bramme[/eluser] Hey all, I'm working on a little something but I've ran into a snag. I'm building an image gallery script but I want it to have the option of storing thumbnails or dynamically outputting them. I made a function thumbnail in my controller, but it's not working... Here's the function: Code: function thumbnail($folder = NULL, $image = NULL) { However, when I visit http://example.com/gallery/thumbnail/test/agonyinside.jpg (gallery is my controller) I get a nice and shiny CI error 404. I'm guessing this has something to do with the uri path containing the .jpg extension. Has anybody got any tips on how to implement dynamicly resized images? edit: okay, I got a little confused, my ci folder was in a gallery folder and my controller is also called folder, so the url should be http://example.com/gallery/gallery/thumbnail/test/agonyinside.jpg but this just gives me a white page... Found out I had a typo in my source image path too... Updated code: Code: function thumbnail($folder = NULL, $image = NULL) { Problem with image lib and dynamic output - El Forum - 09-07-2008 [eluser]Sumon[/eluser] is the folder $folder have 0777 permission? Problem with image lib and dynamic output - El Forum - 09-07-2008 [eluser]Bramme[/eluser] It's on localhost, so I'd be guessing yes... Besides, if you're using dynamic output, I wouldn't know why I'd have to have my folder chmodded. Problem with image lib and dynamic output - El Forum - 09-07-2008 [eluser]Sumon[/eluser] Without having chomd 0777 i am not sure resized thumbnail create or not in server because resized image itself a file and need a place to save itself. No doubt it will work fine in localhost. Problem with image lib and dynamic output - El Forum - 09-07-2008 [eluser]Bramme[/eluser] The whole point of dynamically outputting the image is that it doesn't have to be saved. It just sits in memory (as far as I know). And I seriously doubt it works on localhost as it ISN'T working right now... Problem with image lib and dynamic output - El Forum - 09-08-2008 [eluser]Bramme[/eluser] Anybody else got an idea? |