[PHP-users 24707] BLOB内の複数画像表示における問題

onitani @ cec-ltd.co.jp onitani @ cec-ltd.co.jp
2005年 2月 24日 (木) 16:31:31 JST


$B=i$a$FEj9F$5$;$F$$$?$@$-$^$9!#!!(JOwara$B$H?=$7$^$9!#(J

$B2<5-$NLdBj$N2r7hJ}K!$r!"$4B8CN$NJ}$465<x$$$?$@$1$J$$$G$7$g$&$+!)(J

$B#1!!4D6-(J
$B!!-!!!(JDBMS:Oracle9i Release2.0$B!J(JWindows 2000 Server$B>e!K(J
$B!!-"!!(JWeb$B!!!'(JApache/1.3.31 (Win32)
$B!!-#!!(JPHP Version5.0.2
$B#2!!8=>](J
	$B2<5--!(J,$B-"$N%Z!<%8$rI=<($9$k$H!"(JApache$B$N%(%i!<%m%0$K-#$N%(%i!<$,=PNO$5$l!"(J
	$B0lIt$N2hA|$,I=<($5$l$:!"$+$D(JApache$B$,0[>o=*N;$9$k!#(J
$B!!-!!!(JHTML
    <html>
    <body>
    Media : <br>
    <img src="/lob_sel3.php?mediaId=CONTENT::00000000">
    <img src="/lob_sel3.php?mediaId=CONTENT::00000001">
    <img src="/lob_sel3.php?mediaId=CONTENT::00000002">
    <img src="/lob_sel3.php?mediaId=CONTENT::00000003">
    </body>
    </html>
$B!!-"!!(Jlob_sel3.php$B$NFbMF(J
<?php
    $ID = $_REQUEST["mediaId"];
    $FNAME = str_replace(":","",$ID);
    $fp = fopen('c:\\temp\\'.$FNAME.'.log',"a+");
    fwrite($fp,"connect start\n");
    $conn = OCILogon("dbUser", "dbpasswd", "dbSID");
    /* SQL $B$N:n @ .(J */
    $sql  = "SELECT filename, media ";
    $sql .= "FROM CONTENT ";
    $sql .= "WHERE OID = '$ID' ";
    $sql = OCIParse($conn, $sql);
    OCIExecute($sql, OCI_DEFAULT);
    OCIFetchInto($sql, $arr, OCI_ASSOC);
    $filename = $arr["FILENAME"];
    /* Header $B$N=PNO(J */
    header("Content-Type: application/octet-stream");
    header("Content-Description: $filename");
    header("Content-Disposition: attachment; filename=$filename");
    /* $B%U%!%$%kK\BN$N=PNO(J */
    echo $arr["MEDIA"]->load();
    OCIFreeStatement($sql);
    OCILogoff($conn);
?>
   $B>e5-%5%s%W%k$O(J
    http://www.pat.hi-ho.ne.jp/dimension/sample/sample_ora_blob.shtml
   $B$r;29M$K$$$?$7$^$7$?!#(J

$B!!-#!!(JApache$B%(%i!<%m%0(J
   [Thu Feb 24 13:33:47 2005] [info] Parent: Created child process 2360
   [Thu Feb 24 13:33:47 2005] [info] Parent: Duplicating socket 224 and sending it to child process 2360
   [Thu Feb 24 13:33:47 2005] [info] BytesRead = 372 WSAProtocolInfo = 2006620
   [Thu Feb 24 13:37:37 2005] [info] master_main: Restart event signaled. Doing a graceful restart.
   [Thu Feb 24 13:37:37 2005] [info] Parent: Created child process 1036
   [Thu Feb 24 13:37:37 2005] [info] Parent: Duplicating socket 224 and sending it to child process 1036
   [Thu Feb 24 13:37:38 2005] [info] BytesRead = 372 WSAProtocolInfo = 2006620
   [Thu Feb 24 13:52:01 2005] [info] master_main: Restart event signaled. Doing a graceful restart.



PHP-users メーリングリストの案内