php - Show images in view from http header -
I create an image in my controller (I use Symphony 2) and when I have my image with my If the reaction comes back, I get it:
HTTP / 1.0 200 OK cache-control: no-cache content-configuration: inline; File name = "" content-type: image / JPEG I need to show an image in my view, but if I put it:
& lt; Img src = "& lt;? = $ Response?" / & Gt; The browser shows a 404 error and if I
I only get
HTTP / 1.0 200 OK cache-control: no-cache content-configuration: inline; File name = "example.jpg" content-type: image / jpeg Date: Wednesday, 08 October 2014 14:55:24 GMT X-Sendfile: 67902 I want to show that image Any thoughts?
Thank you!
You can use the path that displays your image
Your controller In:: > Header-> Set ('cash-control', 'private'); $ Response- & gt; Header-> Set ('content-type', 'image / jpg'); $ Reaction-> Header-> Set ('content-dispute', 'attachment; file name = "example.jpg"'); $ Response & gt; SetContent (file_get_contents ('example.jpg')); Return $ Reaction; "& gt;
कोडर्स के लिए php भाषा कोड के नमूने
ReplyDeleteएकाधिक फ़ाइल php स्क्रिप्ट अपलोड करें