From b71ccf7a5885838b1043fa0b21904f40019c1bd2 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Wed, 8 Sep 2021 00:37:58 +0800 Subject: [PATCH] 111 --- http-server/Message/Uploaded.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/http-server/Message/Uploaded.php b/http-server/Message/Uploaded.php index 7960fd5e..0e7ef0ad 100644 --- a/http-server/Message/Uploaded.php +++ b/http-server/Message/Uploaded.php @@ -61,10 +61,13 @@ class Uploaded implements UploadedFileInterface /** * @param string $targetPath + * @return bool */ - public function moveTo($targetPath) + public function moveTo($targetPath): bool { @move_uploaded_file($this->tmp_name, $targetPath); + + return file_exists($targetPath); } /**