[PHP/Forms] Hämta POST-variabel av typ File

Permalänk
Medlem

[PHP/Forms] Hämta POST-variabel av typ File

Jag vill hämta en POST-variabel av typen File med PHP, men jag får det inte att fungera.

Detta fungerar:

<form method="post" action="test.php"> <input type="text" name="foo" value="bar" /> <input type="submit" /> </form> <? echo $_POST['foo']; ?>

Detta fungerar inte:

<form method="post" action="test.php"> <input type="File" name="foo" /> <input type="submit" /> </form> <? echo $_POST['foo']; ?>

Någon som vet hur jag ska få det att fungera?

Visa signatur

It is one thing to describe an interview with a gorgon or a griffin, a creature who does not exist.
It is another thing to discover that the rhinoceros does exist, and then take pleasure in the fact that he looks as if he didn't.
- G.K. Chesterton

Permalänk
Medlem

Du hämtar allting ifrån $_FILES.
http://se.php.net/features.file-upload

Permalänk
Medlem

Det var tydligen en bugg i PHP. Det ska vara fixat, förmodligen i development-versionen. Får ta och ladda ner den.

Visa signatur

It is one thing to describe an interview with a gorgon or a griffin, a creature who does not exist.
It is another thing to discover that the rhinoceros does exist, and then take pleasure in the fact that he looks as if he didn't.
- G.K. Chesterton

Permalänk
Medlem

dectgap: Ah, okej. Vad bra, då kan jag ha kvar den stabila versionen. Tackar så mycket.

Visa signatur

It is one thing to describe an interview with a gorgon or a griffin, a creature who does not exist.
It is another thing to discover that the rhinoceros does exist, and then take pleasure in the fact that he looks as if he didn't.
- G.K. Chesterton