If you have access to your php.ini then turn both magic_quotes_gpc and magic_quotes_runtime Off and restart the webserver. If not you could use a .htaccess
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
Retrieving Binary Data and Displaying
Moderator: General Moderators
-
WelshApple
- Forum Newbie
- Posts: 9
- Joined: Fri May 21, 2004 12:07 pm
- Location: Wales-UK
YeyWaldoMonster wrote:Now it must be working.
It is also posible to use mysql_pconnect() instead of mysql_connect().Code: Select all
<?php $link = mysql_connect('localhost', 'USERNAME', 'PASSWORD'); mysql_select_db('DATABASE'); $query = "SELECT image FROM test WHERE id='1'"; $result = mysql_query($query); // removed $link header('Content-type: image/jpeg'); list($data) = mysql_fetch_row($result); print $data; mysql_close($link); // close connection ?>
Then you don't have to close the connection.
Thanks a million!
- WaldoMonster
- Forum Contributor
- Posts: 225
- Joined: Mon Apr 19, 2004 6:19 pm
- Contact:
I hope it is still working.
You have replayed before I finessed editing.
Take a look back if this is also working.
You have replayed before I finessed editing.
Take a look back if this is also working.
WelshApple wrote:YeyWaldoMonster wrote:Now it must be working.
It is also posible to use mysql_pconnect() instead of mysql_connect().Code: Select all
<?php $link = mysql_connect('localhost', 'USERNAME', 'PASSWORD'); mysql_select_db('DATABASE'); $query = "SELECT image FROM test WHERE id='1'"; $result = mysql_query($query); // removed $link header('Content-type: image/jpeg'); list($data) = mysql_fetch_row($result); print $data; mysql_close($link); // close connection ?>
Then you don't have to close the connection.That's the ticket!
Thanks a million!