Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function saveFile($file){
- $root = $_SERVER['DOCUMENT_ROOT'];
- $fileName = $file->getClientFilename();
- $destination = realpath("$root/img/uploaded/full/$fileName");
- try {
- $file->moveTo($destination);
- return $destination;
- } catch (\Exception $e){
- return $e;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement