You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 11, 2024. It is now read-only.
echo"Sorry, only JPG, JPEG, PNG & GIF files are allowed.";
38
+
$uploadOk = 0;
39
+
}
40
+
41
+
// Check file size
42
+
if ($_FILES["fileToUpload"]["size"] > 5000000) {
43
+
echo"Sorry, your file is too large.";
44
+
$uploadOk = 0;
45
+
}
46
+
47
+
// Check if $uploadOk is set to 0 by an error
48
+
if ($uploadOk == 0) {
49
+
echo"Sorry, your file was not uploaded.";
50
+
// if everything is ok, try to upload file
51
+
} else {
52
+
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
53
+
echo"The file ". htmlspecialchars( basename( $_FILES["fileToUpload"]["name"])). " has been uploaded. Path to your image is https://cdn.sappy.ga/img/". htmlspecialchars( basename( $_FILES["fileToUpload"]["name"])). "";
54
+
} else {
55
+
echo"Sorry, there was an error uploading your file.";
0 commit comments