note 26946 added to function.base64-encode
| From: | webmaster at mainbotics dot com | Date: | Mon, 18 Nov 2002 18:49:40 +0000 |
| Subject: | note 26946 added to function.base64-encode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39652@lists.php.net to get a copy of this message | ||
In response to guy at bhaktiandvedanta dot com:
You can simply save the images in a blob field (Binary Large OBject) in the data base just by using
mysql_escape_string(), which escapes NULL, CR, LF, \x1A, ... and other special-meaning characters,
so you can directly insert the image into the sql query without any problem and without any kind of
encoding (just the slashes). That way, you'll save space at the data base and when you get the
image, you can directly dump it to the browser without making any kind of decoding. The script will
so become faster and more efficient, and MySQL is already aware about the field contains binary
data, not text data, to threat it in a convenient way.
--
http://www.php.net/manual/en/function.base64-encode.php
http://master.php.net/manage/user-notes.php?action=edit+26946
http://master.php.net/manage/user-notes.php?action=delete+26946
http://master.php.net/manage/user-notes.php?action=reject+26946