Jalz Posted April 27, 2010 Author Share Posted April 27, 2010 Blimey - That works! So its because I had seperate bits of php code that was causing teh error.......dont understand it???? Thank you all very much for taking the time out helping me to identify the problem - this is a great community, would never of sussed it as I've got lots of pages with seperate bits of code like that all on one page. Now I need to move that test code onto the server and into my real php pages Cheers J Quote Link to comment https://forums.phpfreaks.com/topic/199929-displaying-images-using-the-readfile-command/page/2/#findComment-1049595 Share on other sites More sharing options...
PFMaBiSmAd Posted April 27, 2010 Share Posted April 27, 2010 I'm going to guess that output_buffing is on in your php.ini and that prevented the error_reporting/display_errors code from showing any header() errors. There weren't any header errors (should have been due to the line that was outside of the php tags) because the output_buffering was hiding the output that was occurring before the header() statements. Quote Link to comment https://forums.phpfreaks.com/topic/199929-displaying-images-using-the-readfile-command/page/2/#findComment-1049596 Share on other sites More sharing options...
de.monkeyz Posted April 27, 2010 Share Posted April 27, 2010 It wasn't because the php was separated per-say. It was because their were line breaks in between the opening and closing php tags, which are output. So that output was contributing to the final final binary of the image, thus corrupting it. Quote Link to comment https://forums.phpfreaks.com/topic/199929-displaying-images-using-the-readfile-command/page/2/#findComment-1049597 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.