Jump to:
Screenshot
Attributes
Files
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
</form>
</body>
</html>
<?php
if (!empty($_FILES['uploaded_file'])) {
$path = "uploads/";
$path .= basename($_FILES['uploaded_file']['name']);
if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
echo "The file " . basename($_FILES['uploaded_file']['name']) . " has been uploaded";
} else {
echo "There was an error uploading the file, please try again!";
}
}
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-13 02:23:37.964779]
1 0 1 0.000193 393512
1 3 0 0.000260 396456 {main} 1 /var/www/html/uploads/ups.php 0 0
1 3 1 0.000278 396456
0.000306 314224
TRACE END [2023-02-13 02:23:37.964931]
<html><head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"><br>
<input type="submit" value="Upload">
</form>
</body></html>
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
</form>
</body>
</html>
<?PHP
if(!empty($_FILES['uploaded_file']))
{
$path = "uploads/";
$path = $path . basename( $_FILES['uploaded_file']['name']);
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
echo "The file ". basename( $_FILES['uploaded_file']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
}
?>