Answer the question
In order to leave comments, you need to log in
Why is the file not moving?
I am learning php trying to upload a file and move it to a folder here is the code
<?php
$path = '../';
//mkdir($path . 'alex');
if (isset($_REQUEST['add'])) {
if ($f = action_upload_files($path) === False) {
echo "File hasn't been uploaded";
}
}
function action_upload_files($path) {
if (move_uploaded_file($_FILES['upload']['tmp_name'], $path)) {
return True;
} else {
return False;
}
}
echo '<pre>';
var_dump($_FILES['upload']);
echo '</pre>';
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question