Jump to content

header('Content-Type: image/jpeg'); not behaving as I hoped it would.


Recommended Posts

When I run a script that contains the following code:

 

header('Content-Type: image/jpeg');
readfile("$IMAGES_FILE_PATH/oldman.jpg");

 

I think that my browser should be showing the image that's being referenced (whose contents are, in fact, being read correctly), but instead, it displays the URL of the script that was just run (http://127.0.0.1:8000/Jiggzy%20Quick-Start%20Package/scripts/smartimageresizercustom.php).

 

I'm currently using MAMP (Version 1.7.2 - default installation) and running Leopard (10.5.7) on a MacBook. My PHP information can be found at http://www.jiggzy.com/phpinfo/.

 

Could anyone shed some light on the issue of why DreamHost is displaying the image properly, but not my local version of PHP? Thanks in advance for any help!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.