Erstelle das datadir wenn es nicht existiert

This commit is contained in:
root 2023-03-22 23:26:41 +00:00
parent be17525b25
commit 4af6907f36
1 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,10 @@
include('config.php'); include('config.php');
if(!is_dir($datadir)) {
mkdir($datadir);
}
if(isset($_FILES['upload'])) { if(isset($_FILES['upload'])) {
$extension = pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION); $extension = pathinfo($_FILES['upload']['name'], PATHINFO_EXTENSION);
if($extension == 'jpg' || $extension == 'jpeg' || $extension == 'png') { if($extension == 'jpg' || $extension == 'jpeg' || $extension == 'png') {