[Solved] Input Get Problem |
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
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
Problem is now solved I had to use urldecode instead and work like a charm
PHP Code: urldecode(substr($image, strlen(FCPATH . 'uploads/')))
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |