Saturday, May 30, 2009

Nginx upload module does not support input array for PHP

Please refer below email,

Jacky Zhang wrote:
> Hi Valery,
>
> It's fine if I using nginx upload module to upload a signle file.
> but It look incorrect that when I use a input like this:
>
>
<input type="file" name="userfiles[]" />

>
> Do you have any suggestion?

No, arrays won't work, you have to list every file input field individually.

--
Best regards,
Valery Kholodkov

Monday, May 4, 2009

two useful String extend functions.


String.prototype.trim = function() {
return this.replace( /^\s*|\s*$/g, "" );
}

String.prototype.addslashes = function () {
return this.replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
}