Answer the question
In order to leave comments, you need to log in
Why does it return false when trying to move a file?
foreach ($this->request->getUploadedFiles(true) as $file) {
$file_name = sha1(mt_rand(0, 100) . mt_rand(0, mt_rand(0, 100))) . $file->getName();
if($file->moveTo($this->config->application->imagesDir . $file_name)){
$article->preview_img = $file_name;
}
}
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