wolves Posted March 7, 2006 Share Posted March 7, 2006 Hi, I have a table to store my images....I store the content and the image type,And I show the image like this[code] //the id of the image $id = $_GET["id"]; //database connection $db = connect(); //query $res = lookInfoSql($db,"VAD0362","*","CODSEQ = ?",$id); if ($res) { //my image type $image_type = $res["FILE_TYPE"]; //my image content $image = $res["ds_arquivo"]; Header("Content-type: $image_type"); print $image;}[/code]It's works well, but some images don't apper complete....what is the problem??tanks Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted March 7, 2006 Share Posted March 7, 2006 is it just gif's that don't display properly?if so check which gdlibrary you have installed - there was a period where gif support was not included some check out [a href=\"http://uk.php.net/manual/en/function.gd-info.php\" target=\"_blank\"]gd info[/a] Quote Link to comment Share on other sites More sharing options...
wolves Posted March 7, 2006 Author Share Posted March 7, 2006 [!--quoteo(post=352456:date=Mar 7 2006, 06:29 AM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Mar 7 2006, 06:29 AM) [snapback]352456[/snapback][/div][div class=\'quotemain\'][!--quotec--]is it just gif's that don't display properly?if so check which gdlibrary you have installed - there was a period where gif support was not included some check out [a href=\"http://uk.php.net/manual/en/function.gd-info.php\" target=\"_blank\"]gd info[/a][/quote]Array ( [GD Version] => bundled (2.0.28 compatible) [FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] => 1 [GIF Read Support] => 1 [GIF Create Support] => 1 [JPG Support] => 1 [PNG Support] => 1 [WBMP Support] => 1 [XPM Support] => [XBM Support] => 1 [JIS-mapped Japanese Font Support] => ) Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted March 7, 2006 Share Posted March 7, 2006 hmmmmaybe an execution time thing - you outputting lost of pics? is there any difference if you refresh the page? Quote Link to comment Share on other sites More sharing options...
wolves Posted March 7, 2006 Author Share Posted March 7, 2006 It's only 1 pic//my function to upload the file[code]function getFileUploaded($name) { if($_FILES) { if(is_uploaded_file($_FILES[$name]["tmp_name"])) {/*I use fopen, But I post fope, because can't post fopen.... strange thing.....*/ $userfile = fread(fope($_FILES[$name]["tmp_name"], "r"),filesize ($_FILES[$name]["tmp_name"])); $file_name = $_FILES[$name]["name"]; $file_size = $_FILES[$name]["size"]; $file_type = $_FILES[$name]["type"]; return Array("name" => $file_name, "type" => $file_type, "size" => $file_size, "toStore" => $userfile); } }}[/code]no diference if I refresh the page....it's seem that the image didn't upload complete Quote Link to comment Share on other sites More sharing options...
wolves Posted March 8, 2006 Author Share Posted March 8, 2006 database is mssql Quote Link to comment Share on other sites More sharing options...
wolves Posted March 10, 2006 Author Share Posted March 10, 2006 anyone? Quote Link to comment 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.