Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it L'avatar di dalang
    Registrato dal
    May 2003
    Messaggi
    252

    [Oracle] download di un campo blob

    Ciao, ho una tabella oracle, con il campo UPFILE di tipo blob. Sto cercando di fare uno script per il download dei file nel campo blob ed so questo script:

    codice:
    <?
    $id=$_REQUEST['ID_doc'];
    
    $query =  "SELECT \"TIPO\", \"TITOLO\", \"DIMENSIONE\", \"UPFILE\"
    				FROM \"DOCUMENTI\" 
    				WHERE ID = ".$id;
    $stmt = $oracle->parseAndFetch($query);
    if (Error::isError($stmt)) {
    	$stmt->throwAsFatal();
    }
    
    $result = $stmt[0];
    
    	// If any text (or whitespace!) is printed before this header is sent,
     	// the text won't be displayed and the PDF won't be loaded correctly.
    	// Comment out this line to see the text and debug such a problem.
    	header("Content-Type: ".$result['TIPO']);
    	// http://www.php.net/header has some interesting comments on
    	// sending a "Content-Disposition" header
    	// It will force IE to give a "save" window instead of opening it.
    	header("Content-Disposition: attachment; filename=".$result['TITOLO']);
    	header("Content-Length: " . $result['DIMENSIONE']);
    	echo $result['UPFILE']->load(); 
    	
    
    ?>
    ma mi da questo errore:

    Call to a member function on a non-object in /srv/www/sorgenti/modules/documents/download.php on line 23

    la riga 23 è quella evidenziata.

    Soluzioni? Thanks.

  2. #2
    Utente di HTML.it L'avatar di dalang
    Registrato dal
    May 2003
    Messaggi
    252
    UP!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.