Can't upload file using PHP on Ubuntu | Solved


Change permission to UPLOAD file into upload folder on UBUNTU

Read + Write

sudo chmod -R a+rw images/

Read + Write + Execute

 sudo chmod -R a+rwx upload/

Example Like this:

bitnahuhi@ip-000-00-00-00:~/htdocs/admin$ sudo chmod -R a+rwx images/

 <?php 


/<?php

  $name = $_FILES['file']['name'];
  $temp = $_FILES['file']['tmp_name'];

  if(move_uploaded_file($temp,"upload/".$name)){
   echo "Your file was uploaded";
}
 else
{ 
 echo "Your file cound't upload";
}

?>

?> 


No comments:

Post a Comment

JavaScript + Angular-compatible version of loan amortization calculator that you can integrate into an Angular component or service

  JavaScript Version of Loan Amortization 1. Loan Calculator Function (Pure JS/TS) export function calculateLoanSchedule ( principal:...

Best for you