2012-03-30 8 views
1

$ _file funktioniert gut, wenn ich hochladen myPCVideo.mov und PHP zeigt:

Array ([name] => simpsons.mov [type] => video/quicktime [tmp_name] => F:\xampp\tmp\php1B6.tmp [error] => 0 [size] => 99279) 

aber wenn ich versuche, myMobileVideo.MOV php sagt

hochladen

Notice: Undefined index: Datei in F: \ xampp \ htdocs \ Videos \ post.php auf Linie 2

Ich weiß nicht, warum php nicht $ _FILE Hochgeladene Dateiattribute nicht eingestellt, wenn ich Video mit Großbuchstaben-Erweiterung verwenden ..?

HTML-Skript:

<form action="post.php" method="post" enctype="multipart/form-data"> 
<input type="file" id="file" name="file"/> 
<input type="submit" name="upload" id="upload" value="" class="submt_post" /> 
</form> 

PHP-Datei Skript:

<?php 
    print_r($_FILES['file']); 
?> 
+0

Können Sie den Code teilen? – Menztrual

+0

Zeigen Sie die Codes von F: \ xampp \ htdocs \ videos \ post.php –

+0

@Shiplu

Antwort

1

, dass Max Datei-Upload-Problem war .. nach Erhöhung in php.ini es funktioniert für .MOV-Erweiterung, eigentlich die vi deo Größe ist mehr als 8M.

Aber Dank an alle

0

konnte ich den Fehler

Notice: Undefined index: file in C:\Apache\xampp\htdocs\lab\stockoverflow\stack.php on line 2 

Call Stack

replizieren
1 0.0017 333248 {main}() ..\stack.php:0 

Alles, was Sie wo fehlt Variablendeklaration

if(isset($_FILES['file'])) 
{ 
    print_r($_FILES['file']); 
} 

Antwort

Array ([name] => 1.MOV [type] => video/quicktime [tmp_name] => C:\Apache\xampp\tmp\php81EB.tmp [error] => 0 [size] => 88) 

Dank

:)

Verwandte Themen