Welcome Guest, Not a member yet? Register   Sign In
Can’t display image in jpg format
#1

[eluser]Wangringring[/eluser]
I've got a problem about display image in CI.
I don't want to use <img> tab to display image.
Does it have any library in CI?
I just want to display an image. I try to use image_lib() but it didn't work too.

Now I'm trying to use simple code to display image.
My code in View is like this

Code:
header("Cache-control: private");
header("Content-Type: image/jpg");
header("Content-Disposition: inline ;filename=arnon.jpg");
$fn=fopen("images/arnon.jpg","r");
fpassthru($fn);

but It displays not an image. It likes many ramdom-text and special characters like this:
Code:
Oฝฎดs]r๒#๗ฝ=?ถฒณด#๏ฐP% ๋ต˜# ชฒ?๓โมมฌ ‰#JFIF###HHํ Adobe_CM#๎#Adobed€#„ ### # # ### ########## # # # ################

Could anyone suggest me please?


Messages In This Thread
Can’t display image in jpg format - by El Forum - 08-27-2007, 01:03 AM
Can’t display image in jpg format - by El Forum - 08-27-2007, 05:29 AM
Can’t display image in jpg format - by El Forum - 08-27-2007, 07:58 PM
Can’t display image in jpg format - by El Forum - 08-28-2007, 08:32 PM
Can’t display image in jpg format - by El Forum - 03-23-2011, 09:41 AM
Can’t display image in jpg format - by El Forum - 03-23-2011, 09:53 AM
Can’t display image in jpg format - by El Forum - 03-23-2011, 01:57 PM
Can’t display image in jpg format - by El Forum - 03-23-2011, 02:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB