In dieser Frage möchte ich Datei in PHP hochladen, aber ich kann keine Datei hochladen und ich bekomme diese "Warnung: move_uploaded". enter image description here Ich habe einen Fehler Screen Shot angehängt.Datei kann nicht hochgeladen werden Warnung: move_uploaded_file
This is my **uploadhtml.php** file
<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>
This is my **upload.php** file
<?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!";
}
}
?>
Danke nun mit $ path = "../uploads/" ;. – Kumar
Awesome, Happy-Codierung :) – Thamaraiselvam
Es ist immer gut, die absolute angeben, um Fehler zu vermeiden – Thamaraiselvam