ERLEDIGT
JA
JA
ANTWORTEN
3
3
ZUGRIFFE
188
188
EMPFEHLEN
-
Hallo nochmal!
Ich habe ein kleines Problem, also man kann ja den Namen einer Datei, die man hochgeladen hat auslesen;
Nun möchte ich gern prüfen, ob die Dateiendung .zip ist. Wie kann man die Endung auslesen?PHP-Code:$_FILES['projects_image']['name']
Eventuell so irgendwie;
PHP-Code:$_FILES['projects_image']['typ']
-
PHP-Code:
$file_extension = strtolower(substr(strrchr($_FILES['projects_image']['name'], '.'), 1)); // Erweiterung der Datei ermitteln
-
25.03.08 16:07 #3Gefunden auf php.netThe contents of $_FILES from the example form is as follows. Note that this assumes the use of the file upload name userfile, as used in the example script above. This can be any name.
$_FILES['userfile']['name']
The original name of the file on the client machine.
$_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An example would be "image/gif". This mime type is however not checked on the PHP side and therefore don't take its value for granted.
$_FILES['userfile']['size']
The size, in bytes, of the uploaded file.
$_FILES['userfile']['tmp_name']
The temporary filename of the file in which the uploaded file was stored on the server.
$_FILES['userfile']['error']
The error code associated with this file upload. This element was added in PHP 4.2.0KIDS Kinderbetreuungsdienst
Xing
"When you play the game of thrones, you win or you die. There is no middle ground."
by Cersei Lannister in "A Game Of Thrones"
-
Dankeschön, es funktioniert!
Ähnliche Themen
-
URL auslesen
Von antihero im Forum PHPAntworten: 10Letzter Beitrag: 14.03.05, 08:21 -
RDF auslesen
Von tefla im Forum PHPAntworten: 3Letzter Beitrag: 09.11.04, 12:50 -
OS mit VBS auslesen
Von mwarlich im Forum Visual Basic 6.0Antworten: 0Letzter Beitrag: 13.07.04, 09:54 -
*.cmd auslesen?
Von maass im Forum Visual Basic 6.0Antworten: 1Letzter Beitrag: 09.07.04, 11:05 -
db auslesen
Von MajinVegeta im Forum PHPAntworten: 8Letzter Beitrag: 29.01.02, 17:37





Zitieren

Login






[PHP][Snippet] Array zu XML konvertieren