Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Aristotle (5147)

Aristotle
  pagaltzis@gmx.de
http://plasmasturm.org/

Blah blah blah blah blah [technorati.com]

Journal of Aristotle (5147)

Sunday December 03, 2006
03:46 AM

“PHP is a hodgepodge morass”, part ∞

[ #31791 ]

Shaun Inman :

But what if you‘re of the OO-persuasion and use square brackets in your input name attributes to group the properties of your object? Something like this:

<label>Zip File: <input type="file" name="download[zip]" /></label>
<label>Screenshot: <input type="file" name="download[screenshot]" /></label>

Based on the behavior of the $_GET and $_POST superglobals one would assume something along the lines of:

[…]

But what have we learned about assumption? Suddenly, $_FILES is a tangled mess. The properties of your uploaded files become properties of your named object and the properties you were expecting become properties of the uploaded file properties! Zah?

Why am I not surprised?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.