我创建了一个表单,其中有一个文件字段,文件被上传并保存在名为“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"];
此代码已运行,但文件未显示在文件夹中。代码有什么问题