Jump to content

Reading an image file with php file functions


suzzane2020

Recommended Posts

How do I read and output an image file using php.

I have a function that get the image path and then uses fread to read the image file.

 

 

This throws an error  " supplied argument is not a valid stream resource"  pointing to the fread

 

I found out we need the header("Content-type: image/jpg")

but not sure about the rest of the code.

 

Could anyone plz help?

 

thank you

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.