Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3762
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-ID | <1668971.aK4W3vaeNJ@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <php@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Sat, 12 Nov 2011 00:49:39 +0100 |
| User-Agent | KNode/4.4.11 |
| Content-Transfer-Encoding | 8Bit |
| Subject | Re: Images retrives |
| Newsgroups | comp.lang.php |
| References | <189232.705.1321011949235.JavaMail.geo-discussion-forums@prdy11> <4774309.ypaU67uLZW@PointedEars.de> <def1$4ebdb110$50daf161$5342@news.hispeed.ch> |
| Followup-To | comp.lang.php |
| MIME-Version | 1.0 |
| Lines | 69 |
| NNTP-Posting-Date | 12 Nov 2011 00:49:39 CET |
| NNTP-Posting-Host | 8c5469ff.newsspool4.arcor-online.net |
| X-Trace | DXC=0>OIeDH@lCn<6cDJZfMd_c4IUK<Cl32<a4Fo<]lROoRa8kF<OcfhCOkN7R:9EjSaToDZm8W4\YJNl;?f@h5gMfblObTfU2klSEn7QPBFZOKn^b |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.php:3762 |
Followups directed to: comp.lang.php
Show key headers only | View raw
Robert Hairgrove wrote:
> Thomas 'PointedEars' Lahn wrote:
>> sritullimilli@gmail.com wrote:
>>> i didn't get the images from mysql database through php script
>>> i am get this error
>>>
>>> <img src='���JFIF
>>
>> […]
>> C)
>>
>> <?php
>> $img_data = db_query(…);
>> if ($img_data)
>> {
>> ?>
>> <img src="data:image/jpeg;base64,<?php
>> echo base64_encode($imgdata); // [5]
>> ?>"
>> alt="…" …>
>> <?php
>> }
>> ?>
>>
>> A) and B) are more compatible than C) [6].
>> […]
>> C) requires fewer server filesystem resources than A) but it might not be
>> cacheable and it requires more computational effort on the server and
>> client-side instead. It is limited by the maximum URI length accepted by
>> a Web browser (2083 characters by Internet Explorer up to and including
>> version 9.x, at the time of writing [7]); in particular, base64 encoding
>> makes the encoded string about one third longer than the original. (By
>> contrast, URI percent-encoding can make the encoded string three times as
>> long as the original.)
>>
>> Use A) or B) unless there is a compelling reason to use C).
>>
>> I also recommend not to store image data or other BLOBs in the database
>> unless there is a compelling reason to do otherwise. Store the filename
>> in the database instead, and store the image data as a file in the
>> filesystem; that way, it is also easier to implement A).
>> […]
>> [5]<http://php.net/base64_encode>
>> [6]<http://en.wikipedia.org/wiki/Data_URI_scheme>
>> [7]<http://support.microsoft.com/kb/208427/en-us>
>
> There are times when it is necessary to use something like C) ... for
> example, to display on-the-fly generated captcha images.
That is appropriate if you do not have to support IE 7 [^6]. Unfortunately,
we have to.
Please trim your quotes to the relevant minimum next time, and use a proper
`From' header field value.
<http://www.netmeister.org/news/learn2quote.html>
<http://www.interhack.net/pubs/munging-harmful/>
As I suspect you might understand German, you should consider these:
[de] <http://www.afaik.de/usenet/faq/zitieren/>
[de] <http://www.gerlo.de/falsche-email-adressen.html>
PointedEars
--
When all you know is jQuery, every problem looks $(olvable).
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Images retrives sritullimilli@gmail.com - 2011-11-11 03:45 -0800
Re: Images retrives "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-11-11 13:19 +0100
Re: Images retrives The Natural Philosopher <tnp@invalid.invalid> - 2011-11-11 13:02 +0000
Re: Images retrives Jerry Stuckle <jstucklex@attglobal.net> - 2011-11-11 09:10 -0500
Re: Images retrives Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-12 00:22 +0100
Re: Images retrives Robert Hairgrove <nobody@hogwash.com> - 2011-11-12 00:34 +0100
Re: Images retrives Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-11-12 00:49 +0100
Re: Images retrives Jerry Stuckle <jstucklex@attglobal.net> - 2011-11-11 19:37 -0500
csiph-web