Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   php fileupload mit $HTTP_POST_VARS["uploadfile"] (https://www.delphipraxis.net/10450-php-fileupload-mit-%24http_post_vars%5B-uploadfile-%5D.html)

SirThornberry 18. Okt 2003 22:04


php fileupload mit $HTTP_POST_VARS["uploadfile"]
 
wie kann ich bei php eine dateiuploaden wenn ich nicht $uploadfile benutzen kann sondern nur mit $http_post_vars abeiten kann????

fkerber 29. Dez 2003 19:36

Re: php fileupload mit $HTTP_POST_VARS["uploadfile"
 
Hi!

Ich zitiere mal ("PHP 4 - Grundlagen und Profiwissen", Jörg Krause) und hoffe das hilft:

Code:
<form enctype="multipart/form-data" action="script.php" method=post>
<input name="userfile" type="file">
<input type="submit">
</form>
Soviel zum Formular!

Nun zu Auswertung:

Code:
foreach($HTTP_POST_FILES as $strFieldName => $arrPostFiles) {
  if ($arrPostFiles[size]>0 {
     $strFileName = $arrPostFiles[name];
     $strFileTemp = $arrPostFiles[tmp_name];
     @copy ($strFileTemp, "upload/$strFileName");
  }
}
Hoffe, habe beim Abtippen nix vergessen und die Antwort hilft noch (besser spät als nie)

Ciao fkerber


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:57 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz