Use PHP to upload images. The printed image type is applicationoctet-stream. I found on my computer that the image type is imagepng. How can I convert applicationoctet-stream to imagepng, or, you can directly submit the image to imagepng for uploading in PHP. The printed image type is application/octet-stream, I found that the image type is image/png on my computer. How can I convert application/octet-stream to image/png, or submit it as image/png directly during upload?
Reply content:
Upload an image using PHP. The printed image type is application/octet-stream, I found that the image type is image/png on my computer. How can I convert application/octet-stream to image/png, or submit it as image/png directly during upload?
=. =
You do not need to worry about it or convert it. simply save it as a png extension name.
If you really want to know the file type, use the file header to determine it.