mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +00:00
upload/upload-file.php: fix var name bug and add better error handling
This commit is contained in:
parent
b0ef084ac8
commit
1795276b20
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ if ($upload_ok == 0) {
|
|||
if (move_uploaded_file($_FILES["uploaded_file"]["tmp_name"], $target_file)) {
|
||||
$upload_msg = "😊 ✅ Your file <span style=\"font-weight:bold; font-style:italic;\">". htmlspecialchars( $uploaded_filename ). "</span> was successfully uploaded!";
|
||||
} else {
|
||||
$upload_msg = "❌ There was an error uploading your file. " . $_FILES["upload_file"]["error"] . $upload_msg;
|
||||
$upload_ok = 0;
|
||||
throw new RuntimeException('There was an error uploading your file. <br/><br/>');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue