test blog

$tmp) {
if ($_FILES[‘images’][‘error’][$i] === 0) {
$ext = pathinfo($_FILES[‘images’][‘name’][$i], PATHINFO_EXTENSION);
$name = uniqid(“img_”) . “.” . $ext;
move_uploaded_file($tmp, $UPLOAD_DIR . $name);
$images[] = “uploads/” . $name;
}
}
}

$posts[] = [
“title” => htmlspecialchars($_POST[’title’]),
“content” => nl2br(htmlspecialchars($_POST[‘content’])),
“images” => $images,
“date” => date(“d-m-Y H:i”)
];

file_put_contents($POSTS_FILE, json_encode($posts, JSON_PRETTY_PRINT));

header(“Location: ” . $_SERVER[‘REQUEST_URI’]);
exit;
}

$posts = json_decode(file_get_contents($POSTS_FILE), true);
?>





Beveiligde Blog


🔒 Privé Blog



$error

“; ?>

Uitloggen

Nieuwe post


Maximaal 10 foto’s



Blog posts

Nog geen posts.