Hello. I'm not very good with PHP, but need to make some stuff: uploaded file must be randomly renamed with saving of extension and then I need to get this new name in variable.
I try:
$random = fCryptography::randomString(14, 'alphanumeric');
$extension = fFile::getExtension($file);
$file = $uploader->move($dir, 'file')->rename($random . $extension, FALSE);
But get: Fatal error: Using $this when not in object context in ***
inc
flourish
fFile.php on line 787