Your IP : 3.145.152.146
<?php $ds = DIRECTORY_SEPARATOR; //1 $date = date("dmYhis"); $storeFolder = 'upload'; //2 if (!empty($_FILES)) { $tempFile = $_FILES['file']['tmp_name']; //3 $targetPath = realpath(__DIR__ . '/..') . $ds. $storeFolder . $ds; //4 $targetFile = $date.$targetPath. $_FILES['file']['name']; //5 move_uploaded_file($tempFile,$targetFile); //6 } ?> |