Mailinglisten-Archive |
Hallo,
ich hab folgendes Script:
----------schnipp----------schnapp-------------------------------------------
--
<?
// Here we need to look what Suffix the File to be transmitted has
// so that we can add the right header - Informations.
include ('config.inc.php3');
$dl_file = basename($file);
$pieces = explode (".", $dl_file);
$array_count = count($pieces);
$suffnum = $array_count - 1;
// Here we convert the read out suffix to UPPERCASE
$suffix = strtoupper($pieces[$suffnum]);
// This Line is needed to tell the clients browser how the file is
called
header("Content-disposition: filename=".basename($file));
// Some File-Types need a speciel Header to be displayed properly at
the clients browser window.
// This headers can be set here.
switch ($suffix) {
case "PDF": header("Content-type: application/pdf"); break;
case "DWG": header("Content-type: application/dwg"); break;
case "JPG": header("Content-type: image/jpeg"); break;
case "GIF": header("Content-type: image/gif"); break;
case "PNG": header("Content-type: image/png"); break;
default: header("Content-type: application/octetstream");
}
// Now we have to complete all header-Data that are the same for all
File-Types
header("Pragma: no-cache");
header("Expires: 0");
$CheminFichiers = ".";
// Now the File that should be displayed or transmitted is read out
and displayed !
readfile("$Datenverzeichnis/$Dateiverzeichnis/$$file");
// to be sure that we exit this Process here the exit() Command !
exit();
?>
----------schnipp----------schnapp-------------------------------------------
--
Dieses Script soll eine Datei, die in $file übergeben wird mittels readfile
() auslesen und an den Browser schicken. Ich habe wenn das Script
aufgerufen wird eine SSL - Vebindung.
Was jetzt passiert ist, daß sich der Browser wenn ich ein PDF File aufrufe
komplett aufhängt, und wenn ich eine andere Datei aufrufe eine Meldung
aufpoppt: Keine Verbindung zum Webserver!
Wenn ich das ohne SSL mache funktioniert alles einwandfrei !!! Wieso das ?
Ich hab alle FAQ´s dazu durchgestöbert, aber keine Hilfe gefunden ! Ich
muss das heute noch fertig kriegn ! **heul**
Dankeschön im Vorraus
Jens
php::bar PHP Wiki - Listenarchive