Validation and uploading of files, PHP Framework Independent