上传后,我尝试对UploadedFile对象(https://api.symfony.com/2.8/Symfony/Component/HttpFoundation/File/UploadedFile.html)进行转储,如下所示:
PhotoRepository.php on line 188:
UploadedFile {#64 ▼
-test: false
-originalName: "beavis-2_large.png"
-mimeType: "image/png"
-error: 0
path: "/tmp"
filename: "php8nOkku"
basename: "php8nOkku"
pathname: "/tmp/php8nOkku" // there is nothing in the /tmp folder if I ssh in
extension: ""
realPath: false
writable: false
readable: false
executable: false
file: false
dir: false
link: false
}
如果我转到/tmp
文件夹或/var/www/vhosts/mywebsite.com/public/tmp
文件夹,则其中没有任何内容。
但是我可以var_dump并在我的PHP代码(即$file->getPathName()
)中看到哈希的名称/路径,并且它们可以很好地上传到S3。
为什么我通过SSH登录/tmp
文件夹后看不到它们?它们是否出于安全目的而隐藏?