我創建了一個表單,其中一個文件字段位於文件上傳並保存在名爲「att」的文件夾中。 代碼如下:上傳的文件未保存到文件夾中
if($_FILES['file'] != '')
{
//Settings
$allowed_extensions = array("jpg", "jpeg", "gif", "bmp", "pdf", "docx","xlsx");
echo $upload_folder = './att/'; //<-- this folder must be writeable by the script
$errors ='';
//Get the uploaded file information
echo $name_of_uploaded_file = basename($_FILES['file']['name']);
//get the file extension of the file
$type_of_uploaded_file = substr($name_of_uploaded_file,
strrpos($name_of_uploaded_file, '.') + 1);
$size_of_uploaded_file = $_FILES["file"]["size"];
此代碼運行,但該文件未在文件夾中顯示。代碼中有什麼問題