I have successfully used the following code to print a text file from an Oracle blob field to the screen. How should I change this code so that the "File download" window will pop up instead.
-----------code to print a text file out-----------------
<?php
$conn = OCILogon("scott", "tiger", "Daluko");
$stmt = OCIParse($conn, "select file_content from lexicon_files where id=2");
OCIExecute($stmt);
OCIFetchInto($stmt, &$blob);
echo $blob[0]->load();
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
how to show the "File download" box instead of pri
Moderator: General Moderators
-
jiehuang001
- Forum Commoner
- Posts: 39
- Joined: Mon May 12, 2003 12:53 pm
- coolpravin
- Forum Newbie
- Posts: 20
- Joined: Mon May 19, 2003 12:56 am
- Location: India
Try this
Try to use this one
I had not tested it .But hope it will work.
Code: Select all
<?
header("Content-Type: application/html");
header("Content-Disposition: attachment; filename=mychatsession.html");
$conn = OCILogon("scott", "tiger", "Daluko");
$stmt = OCIParse($conn, "select file_content from lexicon_files where id=2");
OCIExecute($stmt);
OCIFetchInto($stmt, &$blob);
echo $blobї0]->load();
OCIFreeStatement($stmt);
OCILogoff($conn);
?>