Call to a member function move() on string
if ($request->hasFile('file')) {
$destinationPath = 'path/th/save/file/';
$files = $request->file('file'); // will get all files
foreach ($files as $file) {//this statement will loop through all files.
$file_name = $file->getClientOriginalName(); //Get file original name
$file->move($destinationPath , $file_name); // move files to destination folder
}
}
Also in PHP:
- create folder using library in php
- convert ip to latitude longitude using php
- acf looping through post types
- alter row in table laravel
- convert php timestamp to date
- Call to a member function move() on string
- does array have key php
- clear server cache laravel
- Allowed memory size of 1610612736 bytes exhausted composer require laravel windows
- change string in capital usin gphp
- find if a string contain any of a given words php
- delete cache file laravel
- auto generated password in php
- PHP Startup: Unable to load dynamic library 'curl'
- check if string has a string php
- ext-dom php 7.4 ubuntu
- create random string using php
- browser console print php variable
- all files in a folder to array php
- PHP message: PHP Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Eav\Model\Attribute\Data\Text::validateLength() must be of the type string, null given
- display file error php
- codeigniter 3 smtp email send
- current time not current date php
- create laravel command to clear cache