How to handle upper and lowercase Image extension(jpg/JPG) ?
Posted: Fri Jan 23, 2009 11:43 am
Experts,
In the database the images are stored with jpg extension ; Where as they are stored as JPG on the server(where my php pages are).
For example :
In mysql database I have ; Image 1 = abc.jpg
On the server where my php pages are I have = abc.JPG
The image will not be displayed.
How to handle image extensions?
Here is the code for viewing images:
In the database the images are stored with jpg extension ; Where as they are stored as JPG on the server(where my php pages are).
For example :
In mysql database I have ; Image 1 = abc.jpg
On the server where my php pages are I have = abc.JPG
The image will not be displayed.
How to handle image extensions?
Here is the code for viewing images:
Code: Select all
<TR>
<TD WIDTH="180" STYLE="background-color:#B6DAF2;"><B>Image 1</B></TD>
<TD><% if($i_row['image1'] && ! substr_count($i_row['image1'],'unavailable.')) { %><IMG
BORDER="0" SRC="<%= '../files/' . $i_row['image1']; %>" ALT=" " WIDTH="300"><% } %></TD>
//Files is where images are stored on server.$i_row[image1] is coming from database.
</TR>
<TR>