Skip to content

Instantly share code, notes, and snippets.

View clementallen's full-sized avatar

Clement Allen clementallen

View GitHub Profile
<?php
$target_dir = "/www/bbc/notifications-mybbcwrapper/static_assets/_uploads/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
if (isset($_POST["submit"])) {
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded! :D";
} else {
echo "Image not uploaded!!";