upload og folder premission
Først jeg ved godt der skal sættes mange tjek ind her for at sikre at det rigtige uploades.Problem jeg har følgende kode og en mappe uploads.
hvis jeg sætter mappen til filepermision 777 så virker det, men hvis jeg sætter den til 755 så virker det ikke. nogen idee.
<?// Where the file is going to be placed
$target_path = "uploads/";
/* Add the original filename to our target path.
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
?>