[Solved] Input Get Problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [Solved] Input Get Problem (/showthread.php?tid=64144) |
[Solved] Input Get Problem - wolfgang1983 - 01-20-2016 I have a small issue on my upload manager controller with my directory href . How my upload manager bootstrap modal works. Once my modal is launched if there are any folders displayed I can click on them and then go inside that folder. And if there is another sub folder I can also click on that and go into that folder. Lest say where in the folder of banners: The problem is when I click on the sub folder in side banners the url href produces Code: http://localhost/project/admin/common/upload/?directory=sub_folder It should in fact produce a url like below. Where it shows that parent folder. Code: http://localhost/project/admin/common/upload/?directory=banners/sub_folder I have two sections in my foreach loop one for images and one for directories. In the foreach loop for directories href how can I make sure it will produce the correct url if in a sub folder? PHP Code: <?php I have now added this code below to the is_dir foreach loop href Code: 'href' => site_url('admin/common/upload') .'/?directory=' . urlencode(substr($image, strlen(FCPATH . 'uploads/'))) and produces the url below also but for some reason says %2F and not / Code: http://localhost/riwakawebsitedesigns/admin/common/upload/?directory=banners%2Fsub_banners RE: Input Get Problem - wolfgang1983 - 01-20-2016 Problem is now solved I had to use urldecode instead and work like a charm PHP Code: urldecode(substr($image, strlen(FCPATH . 'uploads/'))) |