Jump to content

sputnik577

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sputnik577's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. anybody anything, take a look at my code and see if you can see any mistakes
  2. so now i've changed the attribute to mediumblob and i'm not getting anything. I don't know what else to do. Greg
  3. i've tried that, i've made the attribute a varchar and that would point to the file but the server said it could not find the image on the server.
  4. How can i load a picture from a mySQL database using php. The picture is uploaded in a table and then dynamically loaded to a php page. It's attribute in the database table is longblob. [code]while(list($name, $type, $size, $path) = mysql_fetch_array($imgResult))   {         $im = open_image($path); if ($im === false) {         die ('Unable to open image'); } header ('Content-Type: image/jpeg'); imagejpeg($path); echo 'Opened image'; function open_image($path) {         # JPEG:         $im = @imagecreatefromjpeg($path);         if ($im !== false) { return $im; }         # GIF:         $im = @imagecreatefromgif($path);         if ($im !== false) { return $im; }         # PNG:         $im = @imagecreatefrompng($path);         if ($im !== false) { return $im; }         # GD File:         $im = @imagecreatefromgd($path);         if ($im !== false) { return $im; }         # GD2 File:         $im = @imagecreatefromgd2($path);         if ($im !== false) { return $im; }         # WBMP:         $im = @imagecreatefromwbmp($path);         if ($im !== false) { return $im; }         # XBM:         $im = @imagecreatefromxbm($path);         if ($im !== false) { return $im; }         # XPM:         $im = @imagecreatefromxpm($path);         if ($im !== false) { return $im; }         # Try and load from string:         $im = @imagecreatefromstring(file_get_contents($path));         if ($im !== false) { return $im; }         return false; }[/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.