From 4389c4239476002bf9c64b96fa5ec7d84edf3273 Mon Sep 17 00:00:00 2001 From: hu-congming <2491249199@qq.com> Date: Tue, 17 May 2022 23:58:42 +0800 Subject: [PATCH 1/2] 111 --- ...42\345\257\271\345\257\271\350\261\241.md" | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 "\350\203\241\346\242\246\347\217\202/20220217_\351\235\242\345\257\271\345\257\271\350\261\241.md" diff --git "a/\350\203\241\346\242\246\347\217\202/20220217_\351\235\242\345\257\271\345\257\271\350\261\241.md" "b/\350\203\241\346\242\246\347\217\202/20220217_\351\235\242\345\257\271\345\257\271\350\261\241.md" new file mode 100644 index 0000000..e521bbe --- /dev/null +++ "b/\350\203\241\346\242\246\347\217\202/20220217_\351\235\242\345\257\271\345\257\271\350\261\241.md" @@ -0,0 +1,71 @@ +price=$price; + $this->type=$type; + } + function show(){ + echo " + 这辆车的品牌为: $this->type, + 价格为:$this->price 元 + "; + } + } + $a=new car(1000000,"兰博基尼"); + $a->show(); + //2、 在上例的基础上为汽车类定义一个子类——跑车类。为子类实例化对象并访问父类的属性。 + class roadster extends car{ + + +} +$b=new roadster(3000000,"保时捷"); +$b->show(); +//3、 定义一个类,分别定义3个公共的属性和方法,3个受保护的属性和方法,3个私有属性和方法。 +class demo{ + public $a; + public $b; + public $c; + public function a(){ + + } + public function b(){ + + } + public function c(){ + + } + protected $a1; + protected $b1; + protected $c1; + protected function a1(){ + +} + protected function b1(){ + + } + protected function c1(){ + + } + private $a2; + private $b2; + private $c2; + private function a2(){ + + } + private function b2(){ + + } + private function c2(){ + + } + +} \ No newline at end of file -- Gitee From 4653210cc1a9e90aa2c4aa962889d46c028928fd Mon Sep 17 00:00:00 2001 From: hu-congming <2491249199@qq.com> Date: Mon, 23 May 2022 07:36:59 +0800 Subject: [PATCH 2/2] 1 --- ...12\344\274\240\346\226\207\344\273\266.md" | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 "\350\203\241\346\242\246\347\217\202/20220518_\344\270\212\344\274\240\346\226\207\344\273\266.md" diff --git "a/\350\203\241\346\242\246\347\217\202/20220518_\344\270\212\344\274\240\346\226\207\344\273\266.md" "b/\350\203\241\346\242\246\347\217\202/20220518_\344\270\212\344\274\240\346\226\207\344\273\266.md" new file mode 100644 index 0000000..6f73c4c --- /dev/null +++ "b/\350\203\241\346\242\246\347\217\202/20220518_\344\270\212\344\274\240\346\226\207\344\273\266.md" @@ -0,0 +1,60 @@ +```html + + + + + Title + + +
+ 请添加你要上传的文件: +
+ +
+ + +``` + + + + + + + +```php +daxiao) { + echo "文件上传太大"; + } else { + echo "允许上传文件的大小"; + $arr = array("pdf", "docx"); + $name = $_FILES['file1']['name']; + $namearr = explode(".",$name); + $lname = end($namearr); + $result = in_array($lname,$arr); + if (!$result) { + echo "不允许上传文件类型"; + } else { + echo "允许上传文件类型"; + + } + + } +}else{ + echo "上传失败"; +} + + + +``` \ No newline at end of file -- Gitee