base64_decode an image, works on blank page, not on page where text is..

From: Date: Mon, 09 Aug 2004 21:23:22 +0000
Subject: base64_decode an image, works on blank page, not on page where text is..
Groups: php.general 
Request: Send a blank email to php-general+get-193193@lists.php.net to get a copy of this message
If I try to base64_decode an image which was encoded with base64_encode on a blank page, it works, if I try on a page with stuff already on it, it just shows me the source code to the image... Example: Run this code as a blank page, no spaces before or after the <? then run it again with a space or a character.. Any ideas how to fix it? Thanks. <?php if (!function_exists("ac_call_base64_image")) { function ac_call_base64_image ($Image) { //require ("./ACWB/ACWB_Base64_Images.php"); //$Image = $ACWB_B64I[$Image]; return base64_decode($Image); } } // RedX Image... $ACWB_B64I['ACWB'] = "R0lGODlhHAAeAKIAAP8AAP///8DAwICAgAAAAP///wAAAAAAACH5BAEAAAUALAAAAAAcAB4AAAO COLrc7mGUSau9NuL Np+5g9YXhSHbmuaXF81zsEMx0HQgELFmybeO6S89HA2Z2lSHxl jsKaQDALDozipAUZZRabV6fNW43yAtvi15KDCoNcK1q7ERJhHv krSWanNSPnWV+dgUxAoaHiIZpdxcEjo+QkHwqK3iUX5eVmZqbk 50efqFECQA7"; echo ac_call_base64_image ($ACWB_B64I['ACWB']); ?> PS: phpBB2 somehow got it to work, not sure how though :-/

« previous php.general (#193193) next »