Seite 1 von 1

Load problem

Verfasst: Di 03.Mai, 2005 23:40
von Anonymous
Hi

Ich habe problem mit downloaden,
Das Problem ist alle datein die sich unter Ordner media befinden werden als load runtergeladen,Wenn man das Datei auf load.rar umbenennt hat kann man das Datei normal entpacken,Und es kommt dabei das richte datei mit dem richtigen namen raus.

Bitte um hilfe.
mfg

Verfasst: Mi 18.Mai, 2005 19:38
von Demolition_FABI
I've fixed it.

Find in your load.php:

Code: Alles auswählen

	header("Content-Type: application/octet-stream");
	header("Content-Disposition: attachment; filename=\"$file_name\"");
	readfile($download_dir . "" . $file_path . "/" . $file_name);
and replace it with:

Code: Alles auswählen

	$file = $file_name;
	$file2 = stristr ($file, "/");
	while ( $file2 != NULL )
	{$file = substr ($file2, 1);
	$file2 = stristr ($file, "/");}
	header("Content-Type: application/octet-stream");
	header("Content-Disposition: attachment; filename=\"$file\"");
	readfile($download_dir . "" . $file_path . "/" . $file_name);