how to access directory under: application |
[eluser]Zulkhaery B[/eluser]
its newbie question, i trying to save my system image, css and javascript under system/application directory (ie. application/images). how can i access the images directory? thx for your answer. rgds, Zul
[eluser]Zulkhaery B[/eluser]
[quote author="obiron2" date="1190652738"] Code: base_url().images/img.jpg obiron[/quote] that way, will go to http://mysite.com/images. My images directory under public_html/application/images. If i go to http://mysite.com/application/images, did not work. -Zul
[eluser]obiron2[/eluser]
doh! You are right. I created a helper which I always include with a function site_url() which returns "base_url() . application/". then use site_url().images/img.jpg you could of course include in the helper img_url(), css_url() etc.. You could put these in the config, but you would then lose them if you updated the CI installation. hth obiron
[eluser]Matthew Pennell[/eluser]
Code: global $application_folder; ![]()
[eluser]Zulkhaery B[/eluser]
oh, i forgot 'helper'. thanks, I'll trying - Zul
[eluser]wojtekk[/eluser]
saving images in 'system/application directory' is bad idea its page engine and u shouldnt do that 'http://mysite.com/images'<-thats correct
[eluser]Zulkhaery B[/eluser]
[quote author="wojtekk" date="1190655266"]saving images in 'system/application directory' is bad idea its page engine and u shouldnt do that 'http://mysite.com/images'<-thats correct[/quote] main reason is the image can be viewed as mysite.com/application/images/ on image property, right ? if yes, my next question, is it possible using .htaccess to route public_html/application/images to public_html/images ? :gulp: |
Welcome Guest, Not a member yet? Register Sign In |