phpbar.de logo

Mailinglisten-Archive

[php] daten senden...

[php] daten senden...

Tobias Orterer php_(at)_phpcenter.de
Thu, 07 Jun 2001 18:29:37 +0200


kann mir mal einer sagen wieso apache mir
$result = mysql_query("SELECT * FROM $files_table WHERE id='$id'");
if(mysql_num_rows($result) > 0) {
	$row = mysql_fetch_array($result);
	$newname = $files_folder.$row["newname"];
	$oldname = $row["oldname"];
	$size = $row["filesize"];
	copy($newname, $temp_folder.$oldname);
	header("Content-Disposition: attachment; filename="$oldname);
	header("Content-Type: application/octet-stream");
	header("Content-Length: ".$size);
	header("Pragma: no-cache");
	header("Expires: 0");
	$fd=fopen($temp_folder.$oldname, "r");
	echo fread($fd, $size);
	fclose($fd);
	unlink($temp_folder.$oldname);
}
die index.html schickt?
anm. ich speicher die files als unique id ab und zieh den orginal
namen aus der db...

-- 
Tobias Orterer
home(01747688873  && (der_(at)_tobi.li || sms("www.tobi.li"))
work(080417994725 && (to_(at)_iat-matrix.de || tobi_(at)_openwi.de)


php::bar PHP Wiki   -   Listenarchive