You are here

public function FileSystemInterface::moveUploadedFile in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/File/FileSystemInterface.php \Drupal\Core\File\FileSystemInterface::moveUploadedFile()

Moves an uploaded file to a new location.

PHP's move_uploaded_file() does not properly support streams if open_basedir is enabled, so this function fills that gap.

Compatibility: normal paths and stream wrappers.

Parameters

string $filename: The filename of the uploaded file.

string $uri: A string containing the destination URI of the file.

Return value

bool TRUE on success, or FALSE on failure.

See also

move_uploaded_file()

https://www.drupal.org/node/515192

Related topics

1 method overrides FileSystemInterface::moveUploadedFile()
FileSystem::moveUploadedFile in core/lib/Drupal/Core/File/FileSystem.php
Moves an uploaded file to a new location.

File

core/lib/Drupal/Core/File/FileSystemInterface.php, line 35
Contains \Drupal\Core\File\FileSystemInterface.

Class

FileSystemInterface
Provides an interface for helpers that operate on files and stream wrappers.

Namespace

Drupal\Core\File

Code

public function moveUploadedFile($filename, $uri);