المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : ارجو المساعده في ال php


tazzzzzzzzz135
24-03-2008, 03:33 AM
انا يا جماعه عندي دلوقتي صوره في ال DB
we 3awez a3melaha retreve el moshkela kola lama agi a3melaha retreve tetala3 7agat 3'areba keda

‘،±B#$Rءb34r‚رC%’Sًلٌcs5¢²ƒ&D“TdEآ£t6زUâeٍ³„أسuمَF'”¤…´•ؤشنô¥µإصهُVfv†–¦¶ئضوِ 7GWgw‡—§·ا×ç÷5!1AQaq"2پ‘،±B#ءRرً3$bلr‚’CScs4ٌ%¢²ƒ&5آزD“T£dEU6teâٍ³„أسuمَF”¤…´•ؤشنô¥µإصهُVfv†–¦¶ئضوِ '7GWgw‡—§·اےع ?ٍأ0–©ـOـ·ذé9×`k«ئ²ـéدغي¾ت©²تھ²§¹ى؛‌ڈِcz_ خغzK‹„ز`ا 'U¹G@آ°5‡9ح°ْہTآ7Zعںs}ظےC³"ڑ
mّMgè


da el code beta3i


<html>

<head>
<title></title>

</head>

<body>
<?php
header("Content-type: image/jpeg") ;
@ $db=mysql_connect("localhost","root","");
if(!$db)
{
echo "not conected to the DB";
}
mysql_select_db("book_o_rama");
$query="select images.image from images " ;
$result=mysql_query($query);
$row_num=mysql_num_rows($result);
//echo $row_num;
$row=mysql_fetch_array($result);
$img=$row['image'];
echo $img;

?>


</body>

</hml>


YA RET EL MOSA3DA 3ASHAN DA 7AGA HASTA3MELHA FE MASRO3 .....:sadwalk:

TheGhostFish
24-03-2008, 05:53 AM
ضع سؤالك في قسم تطوير المواقع لأن هذا القسم غير مخصص للphp
تحياتي

batata750
24-03-2008, 11:12 PM
bos ya basha

to view the image in the explorer, you should put the call to the image in a <src> tag

you need 2 php pages

the first contains the following (name it GetImage.php) :

<?php
header("Content-type: image/jpeg") ;
@ $db=mysql_connect("localhost","root","");
if(!$db)
{
echo "not conected to the DB";
}
mysql_select_db("book_o_rama");
$query="select images.image from images " ;
$result=mysql_query($query);
$row_num=mysql_num_rows($result);
//echo $row_num;
$row=mysql_fetch_array($result);
$img=$row['image'];
echo $img;

?>





the second contains :
<html>
<body>
<img src="GetImage.php"/>
</body>
</html>


Best Wishes!
:glasses:

abdallat
26-03-2008, 10:43 AM
man you must create the image before open it
try this code

$filename = "image.gif";
$ourFileHandle = fopen($filename,'wr');
$ourFileHandle = fwrite($ourFileHandle,$row['image'],strlen($row['image']));
fclose($ourFileHandle);
$img = $filename;
echo $img;