Php Code To Move Uploaded File To Another Directory
________________________________________________________
I Use In This Tutorial:
- NetBeans IDE .
- XAMPP .
I Use In This Tutorial:
- NetBeans IDE .
- XAMPP .
Php Source Code:
<?php
if(isset($_POST['moveFile']))
{
$fileName = $_FILES['fileName']['name'];
$tempName = $_FILES['fileName']['tmp_name'];
if(isset($fileName))
{
if(!empty($fileName))
{
$location = "MyFilles/";
if(move_uploaded_file($tempName, $location.$fileName))
{
echo 'File Uploaded';
}
}
}
}
?>
<!DOCTYPE Html>
<html>
<head>
<title> PHP MOVE FILE </title>
</head>
<body>
<form action="php_move_upload_file.php" method="post" enctype="multipart/form-data">
<input type="file" name="fileName"><br><br>
<input type="submit" name="moveFile" value="Upload">
</form>
</body>
</html>
Bagikan
Php How To Move Uploaded File To Another Folder
4/
5
Oleh
insurance