How to change content type in php?


How to change content type in php?



I have an image, but it keep doesn't display. I check the image properties (right-click and chose properties), and the I found the "type" is text/html not JPEG image. Is this because the type that cause my images dont show up?? How to change the "Type" value? I am using php...

I display the image in a simple html [img] tag...

EDIT:

Yeah, i tried.. If i include the

<?php header('Content-Type:image/jpeg'); ?> 

It display the URL, very weird huh??

I am using apache, the image is generated by php code...

<img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&amp;h=195&amp;w=540&amp;zc=1&amp;q=95" alt="<?php the_title(); ?> 



Capture image from GPU

1:



Incorrect PNG Colouring (Swapped channels?)
header('Content-Type: image/jpeg'); 
Make sure to call the header() function before doing any output or you will get a "Headers already sent" error..
How to retrieve uploaded image and save to a file with JSP? [duplicate]


Perceptual quality measures for images


Adding external images to PDF using iText

2:



Print CMYK image
Sounds like the image was generated by some kind of server-side script.


RDLC + ReportViewer Control - how to display images from the database?
If it was generated by a PHP script that you have access to, just include a call to header(), like this:.
Comparing two PDF documents that are digitized faxes
header('Content-Type: image/jpeg'); 
Make sure to call header() before outputting anything—even a blank line or stray space that was accidentally output will cause header() to fail (usually it's best if you put your call to header() at the beginning of the script).. If you don't have access to the script that generated the image, then you're out of luck, I think..



88 out of 100 based on 78 user ratings 478 reviews

@