diff --git "a/\346\226\271\347\220\274/20220522-php\344\270\212\344\274\240\346\226\207\344\273\266\344\275\234\344\270\232.md" "b/\346\226\271\347\220\274/20220522-php\344\270\212\344\274\240\346\226\207\344\273\266\344\275\234\344\270\232.md"
index 536ca07f3b5a87c862958358af0e105786567257..45a4c6741189f1ddf03a4cfa222d21e167f782b8 100644
--- "a/\346\226\271\347\220\274/20220522-php\344\270\212\344\274\240\346\226\207\344\273\266\344\275\234\344\270\232.md"
+++ "b/\346\226\271\347\220\274/20220522-php\344\270\212\344\274\240\346\226\207\344\273\266\344\275\234\344\270\232.md"
@@ -1,18 +1,19 @@
+```html
- 实现一个上传文件,仅限制pdf和word模式,大小不超过1m
+ 瀹炵幇涓涓笂浼犳枃浠讹紝浠呴檺鍒秔df鍜寃ord妯″紡锛屽ぇ灏忎笉瓒呰繃1m
-
+```
@@ -23,19 +24,19 @@ if ($error==0){
define("SIZE",1024*1024);
$size=$_FILES['file1']['size'];
if ($size>SIZE){
- echo "上传文件太大了!";
+ echo "涓婁紶鏂囦欢澶ぇ浜嗭紒";
}else{
- echo "可以上传!";
+ echo "鍙互涓婁紶锛";
$array =array("pdf","word");
$name=$_FILES["file1"]['name'];
$nameArr=explode(".",$name);
$lastname=$nameArr[count($nameArr)-1];
$result=array_search($lastname,$array);
if ($result==false){
- echo "不允许上传的类型";
+ echo "涓嶅厑璁镐笂浼犵殑绫诲瀷";
}else{
- echo "允许上传的类型";
+ echo "鍏佽涓婁紶鐨勭被鍨";
}
}
diff --git "a/\346\226\271\347\220\274/20220523-php\346\225\260\346\215\256\345\272\223\344\275\234\344\270\232.md" "b/\346\226\271\347\220\274/20220523-php\346\225\260\346\215\256\345\272\223\344\275\234\344\270\232.md"
new file mode 100644
index 0000000000000000000000000000000000000000..cc7332b2b9bb31a7bd22d9dabdbf057b22e492d6
--- /dev/null
+++ "b/\346\226\271\347\220\274/20220523-php\346\225\260\346\215\256\345\272\223\344\275\234\344\270\232.md"
@@ -0,0 +1,58 @@
+### mysql
+
+```mysql
+create database student charset utf8;
+use student;
+create table user(
+id int primary key auto_increment,
+name varchar(80) not null,
+score decimal(4,1) not null
+);
+```
+
+### php
+
+```php
+";
+mysqli_query($a,'set names utf8');
+$tj="insert into `user` value (null ,'闄堝皬榫','98.5'),(null ,'鍚村ぇ铏','75.5'),(null ,'闄堝緱鑳','66')";
+//澧炲姞鏁版嵁
+$result1 = mysqli_query($a,$tj);
+if ($result1){
+ echo "娣诲姞鏁版嵁鎴愬姛 ";
+}else{
+ echo "娣诲姞鏁版嵁澶辫触 ";
+}
+echo"
";
+//鍒犻櫎鏁版嵁
+$sc= "delete from `user` where `id`=2";
+$result2= mysqli_query($a,$sc);
+if ($result2){
+ echo "鍒犻櫎鏁版嵁鎴愬姛 ";
+}else{
+ echo "鍒犻櫎鏁版嵁澶辫触 ";
+}
+echo"
";
+//淇敼鏁版嵁
+$xg= "update `user` set `score`='55' where `id`=1 ";
+$result3 = mysqli_query($a,$xg);
+if ($result3){
+ echo "淇敼鏁版嵁鎴愬姛";
+}else{
+ echo "淇敼鏁版嵁澶辫触";
+}
+echo "
";
+//鏌ユ壘鏁版嵁
+$cz = "select * from `user` where 'score'=55 ";
+$result4 = mysqli_query($a,$cz) or die("鏌ユ壘鏁版嵁澶辫触
");
+while($b=mysqli_fetch_assoc($result4) ){
+ echo $b['id']." ".$b['name']." ".$b['score']."
";
+}
+```
\ No newline at end of file