ESH/upload_file.php

25 lines
729 B
PHP
Raw Normal View History

2024-10-23 18:28:06 +05:30
<?php
$a=$_FILES['file']['name'];
$b=$_FILES['file']['type'];
$c=$_FILES['file']['size'];
$new=dirname(__FILE__);
$new1="c:/".$a;
move_uploaded_file($_FILES['file']['temp_name'],$new1);
echo "upload data";
/*$target_dir = "Upload/";
$target_file = $target_dir . basename($_FILES["file"]["name"]);
$uploadOk = 1;
echo $_RESUEST[''];
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["file"]["tmp_name"]);
if($check !== false) {
echo "File is an image - " . $check["mime"] . ".";
$uploadOk = 1;
} else {
echo "File is not an image.";
$uploadOk = 0;
}
}*/
?>