Einzelnen Beitrag anzeigen

Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#14

Re: [PHP]ftp_get will nicht so wie ich es will

  Alt 4. Nov 2005, 00:13
Code:
<?php
  $tp = tmpfile ();
  // get file as the tempfile created
  $result = @ftp_fget ( $fp, $tp, $newpath.'/'.$downloadfile, FTP_BINARY);

  // if the server sucessfully got the file
  if ( $result )
  {
    header( "Content-Disposition: inline; filename=$newpath.'/'.$downloadfile\n\n");
    header ( "Content-type: applicatation/download; name=\"$newpath.'/'.$downloadfile\"\n\n" );
    rewind ( $tp );
    fseek($tp, 0, SEEK_SET);
    fpassthru ( $tp );
    die ();
  }
?>
Änderert leider nichts an der Ausgabe.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat