Display php generated images from database

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
gesf
Moderator
Moderator
Posts: 1716
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Tue Jul 05, 2005 5:53 am

Code: Select all

<?php

$img_path = $row_phqs['location'] . $row_phqs['file'];
$img = imagecreatefromjpeg($img_path);

?>
Sincerely,
Gonçalo "gesf" Fontoura

gesf.org | sessionstart.com | urlms.com

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Wed Jul 06, 2005 12:42 am

the problem is that you have to send those headers before anything else.

There are several ways, one of them would be setting output_buffering to on in php.ini
You may also want to use php internal buffering: ob_start(), ob_end(), ob_get_content(), ob_clean() and so on are prety usefull
Best Regards,
Alexej Kubarev
-------------------------------
Zend Certified Engineer
Image Image

User avatar
gesf
Moderator
Moderator
Posts: 1716
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Wed Jul 06, 2005 4:20 am

Oh! Ok... do what Alexei said :)
Sincerely,
Gonçalo "gesf" Fontoura

gesf.org | sessionstart.com | urlms.com

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2213
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Wed Jul 06, 2005 4:31 am

hehe gesf ;)
Best Regards,
Alexej Kubarev
-------------------------------
Zend Certified Engineer
Image Image

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest