|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Viewing jpg's with PHP
I am trying to connect to Oracle 9i db and query for a jpeg. I keep on recieving a windows download popup after executing the webpage. I have enclosed the code. The sql is correct. Dont know what else is wrong. PHP and GD is setup correctly. I can view jpegs through php with a flat file used for storage. Thanks.
<?php $username = "xxxxxxxx"; $passwd = "xxxxxxxxx"; $db="xxxxxxxxxx"; $conn = OCILogon($username,$passwd,$db); if (!$conn) { echo "Connection failed"; echo "Error Message: [" . OCIError($conn) . "]"; exit; } else { echo "Successfully Connected to Database!\n\n"; } ; $conn = OCILogon($user, $password,$db ); $query = "select dbd_image from database where patronid ='11111111'"; $stmt = OCIParse($conn, $query); $err = OCIExecute($stmt); OCIFetchInto($stmt); header('Content-Type: image/jpg'); print $stmt; ocilogoff($conn); ?> |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Viewing jpg's with PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|