From 9ea804236ee867953cfc0f9bebabd6c4d81327c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B1=A4=E4=BA=A6=E5=87=A1?= <1044020597@qq.com>
Date: Wed, 18 May 2022 03:23:58 +0000
Subject: [PATCH 1/2] 1
---
...02\345\270\270\345\244\204\347\220\206.md" | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 "\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md"
diff --git "a/\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md" "b/\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md"
new file mode 100644
index 0000000..12bab09
--- /dev/null
+++ "b/\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md"
@@ -0,0 +1,44 @@
+```html
+
+
+
+
+ 上传文件
+
+
+
+
+
+
+```
+```php
+size){
+ echo "上传的文件过大!";
+ }else{
+ echo "文件上传成功";
+ echo "
";
+ }
+}
+$str=array("pdf","word");
+$name=$_FILES['files']['name'];
+$nameArr =explode(".",$name);
+$nameLast =end($nameArr);
+$nameLast=$nameArr[count($nameArr)-1];
+$result=in_array($nameLast,$str);
+if (!$result){
+ echo "该文件不符合上传的类型";
+}else{
+ echo "该文件符合上传的类型";
+}
+```
\ No newline at end of file
--
Gitee
From d3bf36063d7f222a5f068ea8b1642e2bf813e8e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B1=A4=E4=BA=A6=E5=87=A1?= <1044020597@qq.com>
Date: Wed, 18 May 2022 03:34:10 +0000
Subject: [PATCH 2/2] =?UTF-8?q?update=20=E6=B1=A4=E4=BA=A6=E5=87=A1/202205?=
=?UTF-8?q?18-PHP=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=92=8C=E5=BC=82?=
=?UTF-8?q?=E5=B8=B8=E5=A4=84=E7=90=86.md.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...02\345\270\270\345\244\204\347\220\206.md" | 22 ++++++++++---------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git "a/\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md" "b/\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md"
index 12bab09..a502b65 100644
--- "a/\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md"
+++ "b/\346\261\244\344\272\246\345\207\241/20220518-PHP\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\274\202\345\270\270\345\244\204\347\220\206.md"
@@ -3,13 +3,13 @@
- 上传文件
+ 涓婁紶鏂囦欢
-
@@ -17,16 +17,19 @@
```
```php
size){
- echo "上传的文件过大!";
+ echo "
";
+ echo "涓婁紶鐨勬枃浠惰繃澶э紒";
+ echo "
";
}else{
- echo "文件上传成功";
+ echo "
";
+ echo "鏂囦欢涓婁紶鎴愬姛";
echo "
";
}
}
@@ -34,11 +37,10 @@ $str=array("pdf","word");
$name=$_FILES['files']['name'];
$nameArr =explode(".",$name);
$nameLast =end($nameArr);
-$nameLast=$nameArr[count($nameArr)-1];
$result=in_array($nameLast,$str);
if (!$result){
- echo "该文件不符合上传的类型";
+ echo "璇ユ枃浠朵笉绗﹀悎涓婁紶鐨勭被鍨";
}else{
- echo "该文件符合上传的类型";
+ echo "璇ユ枃浠剁鍚堜笂浼犵殑绫诲瀷";
}
```
\ No newline at end of file
--
Gitee