Advertisement
Guest User

Storage

a guest
Oct 24th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. foreach ( $files as $name => $path ) {
  2.  
  3. if ( ! isset( $_FILES[ $name ] ) )
  4. continue;
  5.  
  6. $extension = pathinfo( $path, PATHINFO_EXTENSION );
  7. $destination = sprintf(
  8. '%s/%d-%s.%s',
  9. $storage_dir,
  10. $entry_id,
  11. md5( $path ),
  12. $extension
  13. );
  14.  
  15. $uploads_stored[] = $destination;
  16.  
  17. //VAR_DUMPING HERE?
  18. var_dump($files); die;
  19.  
  20. // Copy to a permanant storage location
  21. @copy(
  22. $path,
  23. $destination
  24. );
  25. }
  26. return $uploads_stored;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement