【发布时间】:2019-12-18 19:52:50
【问题描述】:
如何将表单中插入的图像上传到服务器,每次新上传都会在主目录中创建新文件夹并将其命名为例如 i1、i2、i3...?
现在我上传的内容正在保存到主文件夹,所以我需要将其分开。
$targetDir = "images/";
$fileName = basename($_FILES["file"]["name"]);
$targetFilePath = $targetDir . $fileName;
$fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION);
【问题讨论】:
标签: image server directory upload