Rev | Line | |
---|
[2] | 1 | <?php
|
---|
| 2 | $param=strtolower($_SERVER['REQUEST_METHOD']) == 'get' ? $_GET : $_POST;
|
---|
[322] | 3 | global $prefix,$dbi;
|
---|
[2] | 4 | if (isset($param['id_cons_gen']))
|
---|
| 5 | $id_cons_gen2=intval($param['id_cons_gen']);
|
---|
| 6 | if (isset($param['id_comune']))
|
---|
| 7 | $id_comune2=intval($param['id_comune']);
|
---|
[265] | 8 | $sql="select descrizione from ".$prefix."_ele_consultazione where id_cons_gen='$id_cons_gen2'";
|
---|
| 9 | $result = $dbi->prepare("$sql");
|
---|
| 10 | $result->execute();
|
---|
| 11 |
|
---|
| 12 | list($nomeFile) = $result->fetch(PDO::FETCH_NUM);
|
---|
[2] | 13 | #$nomeFile="backup";
|
---|
| 14 | header( 'Content-Type: application/octet-stream' );
|
---|
| 15 | header( 'Content-Disposition: attachment; filename="'.$nomeFile.'"' );
|
---|
| 16 | #header( 'Content-Length:'.strlen( $content ) );
|
---|
| 17 | header( 'Content-Transfer-Encoding: binary' );
|
---|
| 18 | include("backup2.php");
|
---|
| 19 | exit(0);
|
---|
| 20 |
|
---|
| 21 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.