Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

Outputting images to a file through OB_start()

images php coding issues or problems here.

Moderators: macek, egami, gesf

Outputting images to a file through OB_start()

Postby Rurik » Wed Sep 12, 2012 7:49 pm

Hello all,

I have a small problem here. I am using the CodeIgniter framework for an application I am extending. No choice there. However one of the things I have had to add is a reporting system, which includes header images, and the ability to download these reports as files.

Outputting to a browser is fine, and outputting to a file is mostly fine, and downloading the file is fine.

I am using ob_start(), ob_get_contents() and ob_end_flush() along with fopen and fwrite to handle both outputs.

The image of course works fine in the html side of things, but when outputting to a file, something changes it so that the image, instead of referencing "insert address here" references "file:///downloaddirectory/specified address", which for obvious reasons wont work.

Is this an issue with php or is there a way around this at all? The issue happens on both windows and linux so it isnt a particular operating system causing the problem.

Thanks in advance,

Rurik
Rurik
New php-forum User
New php-forum User
 
Posts: 1
Joined: Wed Sep 12, 2012 7:41 pm

Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.