Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ?>
- <?php
- include __DIR__ . '/function.php';
- $currentUser = getCurrentUser();
- if (null !== $currentUser && isset($_FILES['img']) && 0 == $_FILES['img']['error'] && is_uploaded_file($_FILES['img']['tmp_name'])) {
- copy($_FILES['img']['tmp_name'],
- __DIR__ . '/images/' . $_FILES['img']['name'] . ''
- );
- echo 'Your photo was successfully downloaded, Thank you !';
- $path = __DIR__ . '/log/log.txt';
- $log = $currentUser . '=>' . $_FILES['img']['name'] . ' ' . 'at' . ' ' . date(DATE_RFC822) . PHP_EOL;
- $record = file_put_contents($path, $log, FILE_APPEND);
- } else {
- header('Location: /Autentificationform.php');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement