Welcome Guest, Not a member yet? Register   Sign In
Cannot display images in assets folder
#1

[eluser]Cgull[/eluser]
Hello,

I am using codeingniter 2.0.3

My folders are:

orders
-application
-assets
-images

In my images folder I have an image called: calendar.jpg

I call this image in one of my view like this:
Code:
<img src="&lt;?php echo base_url();?&gt;assets/images/calendar.jpg" />

The image is not displayed.

When I go to the page source and try to go to the image I get the page not found.

My htaccess file:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|robots|\.txt)
RewriteRule ^(.*)$ /orders/index.php/$1 [L]

I want to use this image as the icon for the datepicker, and since the image is not displayed, I just put in a view to see if it is found.

So my first question is why can't the image be found.
My second question is how will I add the image to the jquery datepicker code? Will I have to hard code the path like so:
Code:
buttonImage: "http://localhost/orders/assets/images/calendar.jpg"
?

Can someone help and tell me why the image is not found?

Thank you.
#2

[eluser]Unknown[/eluser]
But it helped many others including me Smile
#3

[eluser]Cgull[/eluser]
Great, now I don't feel like such a big idiot lol




Theme © iAndrew 2016 - Forum software by © MyBB