00cong.com      


  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could not move file to

#1
PHP Code:
public function index(){
    
$file= new \CodeIgniter\Files\File('http://www.***.com/***.jpg');
    
$type $file->getExtension();
    
//success:jpg
    
$newName $file->getRandomName();
    
$file->move(WRITEPATH.'uploads',$newName);
    
//error:
    //CodeIgniter\Files\Exceptions\FileException
    //Could not move file ***.jpg to D:\\WWW\ci\writable\uploads/ ()




error:
CodeIgniter\Files\Exceptions\FileException
Could not move file ***.jpg to D:\\WWW\ci\writable\uploads/ ()
Reply

#2
Does the destination exist?
Do the permissions of the destination allow for file write operations?
Reply

#3
(02-11-2020, 11:19 AM)dave friend Wrote: Does the destination exist?
Do the permissions of the destination allow for file write operations?

Yes,Is locally developed
Reply

#4
Hello JerryCode !

Using localhost doesn't mean you have the correct permissions to write in the folders. You should verify ;-)

And you could also try to create a random file to see if you there is no permissions issues with CI:
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By , © 2002-2020 .