File uploads with PHP

As a stress relief from the horrors of VBScript, I’ve been working on trying to get file uploads to work again with the b2upload script, now that register_globals=off has been configured. This script wasn’t written to accomodate this new configuration.

The changes were ultimately somewhat minor, especially after finding this piece of documention on the PHP site. Basically, the $HTTP_POST_FILES (or $_FILES) array had to be used to explicitly set the file name variables. Also, the allowed file types array had to be redone to conform with entries in /etc/mime.types, rather than relying on the filename suffix.

Comments are closed.