Image Path |
[eluser]j4zzyh4ck3r[/eluser]
I have folder assets(images, scripts, styles) under application folder at the same level with mvc folders, how can I access images/1.jpg in my view, because when I used "./assets/images/1.jpg" it failed (the image broken). thanks in advance
[eluser]j4zzyh4ck3r[/eluser]
[quote author="InsiteFX" date="1302254639"]Move it out of the application folder! InsiteFX[/quote] Is that possible to use it inside application folder ? Or is it against the rules to put it inside application folder ? Thanks
[eluser]j4zzyh4ck3r[/eluser]
[quote author="toopay" date="1302261764"]Put it same level with 'application' and 'system', then you can do this way[/quote] Sorry, it didn't work, when I see the source, it like this Code: <img src="http://localhost:8088/CodeIgniter_2.0.1/index.php/images/1.jpg" width="640" height="480" title="Zaraki Kenpachi" alt="1.jpg" /> I use just folder images inside application folder with same level with mvc folders and 1.jpg is inside images folder... Thanks
[eluser]toopay[/eluser]
Unbelievable. How its possible, the 'assets' fragment dissapear, when you put this line Code: //Notice that this is should be generated something like [your site relative url]/assets/images/1.jpeg
[eluser]j4zzyh4ck3r[/eluser]
[quote author="toopay" date="1302277415"]Unbelievable. How its possible, the 'assets' fragment dissapear, when you put this line Code: //Notice that this is should be generated something like [your site relative url]/assets/images/1.jpeg I already changed the folder so there is no assets folder anymore, I changed into folder images, so the path is application/images/1.jpg
[eluser]toopay[/eluser]
Then, you just need to remove index.php from your url...
[eluser]j4zzyh4ck3r[/eluser]
[quote author="toopay" date="1302292466"]Then, you just need to remove index.php from your url...[/quote] Do u mean like this ? http://localhost:8888/CodeIgniter_2.0.1/images/1.jpg, it still didn't work
[eluser]toopay[/eluser]
You need to MOVE your assets folder OUT from your application folder. Your directory structure should be something like this... --- assets(or images or whatever) |- application |- system You should can access '1.jpg' with 'http://localhost:8888/CodeIgniter_2.0.1/images/1.jpg' not 'http://localhost:8888/CodeIgniter_2.0.1/application/images/1.jpg' |
Welcome Guest, Not a member yet? Register Sign In |