From 991159b6b580571ae2af5338e5440b4e84ea9719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=87=8C=E8=8A=9D?= <2054884274@qq.com> Date: Sun, 22 May 2022 05:47:51 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=202022?= =?UTF-8?q?0517-php=E6=96=B9=E6=B3=95.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "20220517-php\346\226\271\346\263\225.md" | 176 ---------------------- 1 file changed, 176 deletions(-) delete mode 100644 "20220517-php\346\226\271\346\263\225.md" diff --git "a/20220517-php\346\226\271\346\263\225.md" "b/20220517-php\346\226\271\346\263\225.md" deleted file mode 100644 index bf446bb..0000000 --- "a/20220517-php\346\226\271\346\263\225.md" +++ /dev/null @@ -1,176 +0,0 @@ -```php -brand=$brand; - $this->price=$price; - - } - - /** - * @return mixed - */ - public function getBrand() - { - return $this->brand; - } - - /** - * @param mixed $brand - */ - public function setBrand($brand) - { - $this->brand = $brand; - } - - /** - * @return mixed - */ - public function getPrice() - { - return $this->price; - } - - /** - * @param mixed $price - */ - public function setPrice($price) - { - $this->price = $price; - } - - function show(){ - echo "这辆汽车的牌子是:".$this->brand."它的价格为:".$this->price; - } - -} - -$a=new Car("大众","39999"); -$a->show(); - -echo "
"; -//2、在上例的基础上为汽车类定义一个子类——跑车类。为子类实例化对象并访问父类的属性。 - -class SportsCar extends Car { - - function __construct($brand, $price) - { - parent::__construct($brand, $price); - } - - function cool(){ - echo "它看来非常的酷"; - } - -} - -$b = new Sportscar("劳斯莱斯","9000000"); -echo "这辆汽车的牌子是:".$this->brand."它的价格为:".$this->price; -$b->cool(); -echo "
"; -/3、定义一个类,分别定义3个公共的属性和方法,3个受保护的属性和方法,3个私有属性和方法。 -class A{ - -//公共的 -public $name; -public $age; -public $sex; - function eat(){ - echo "吃饭"; - } - - function sleep(){ - echo "睡觉"; - } - - function skill(){//技能 - echo "手撕鬼子"; - } -//受保护的 -protected $height;//身高 -protected $weight;//体重 -protected $address;//地址 - protected function face(){ - echo "人脸识别"; - } - protected function short(){ - echo "验证码"; - } - protected function information(){ - echo "填写身份证信息"; - } - -//私有的 -private $grade;//成绩 -private $classname;//班级 -private $id;//学号 - /** - * @return mixed - */ - public function getGrade() - { - return $this->grade; - } - - /** - * @param mixed $grade - */ - public function setGrade($grade): void - { - $this->grade = $grade; - } - - /** - * @return mixed - */ - public function getClassname() - { - return $this->classname; - } - - /** - * @param mixed $classname - */ - public function setClassnamel($classname): void - { - $this->classname = $classname; - } - - /** - * @return mixed - */ - public function getId() - { - return $this->id; - } - - /** - * @param mixed $id - */ - public function setId($id): void - { - $this->id = $id; - } - - private function money{ - echo "会花钱"; - } - private function book{ - echo "会看书"; - } - private function attendclass{ - echo "会上专业课"; - } - -} - -``` - - - -- Gitee From 9e408f697673f9764a49d65723e7ba7fc6059848 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=87=8C=E8=8A=9D?= <2054884274@qq.com> Date: Sun, 22 May 2022 05:49:42 +0000 Subject: [PATCH 2/3] 1 1 --- ...2\344\274\240\346\226\207\344\273\266.php" | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 "\351\231\210\345\207\214\350\212\235/20220518-php\344\270\212\344\274\240\346\226\207\344\273\266.php" diff --git "a/\351\231\210\345\207\214\350\212\235/20220518-php\344\270\212\344\274\240\346\226\207\344\273\266.php" "b/\351\231\210\345\207\214\350\212\235/20220518-php\344\270\212\344\274\240\346\226\207\344\273\266.php" new file mode 100644 index 0000000..b9c972a --- /dev/null +++ "b/\351\231\210\345\207\214\350\212\235/20220518-php\344\270\212\344\274\240\346\226\207\344\273\266.php" @@ -0,0 +1,42 @@ + + + + + ϴļ + + +
+ ѡҪϴļ +
+ +
+ + + +size){ + echo "
"; + echo "ϴļ̫"; + echo "
"; + }else{ + echo "
"; + echo "ļϴɹ"; + echo "
"; + } +} +$str=array("pdf","word"); +$name=$_FILES['files']['name']; +$nameArr =explode(".",$name); +$nameLast =end($nameArr); +$result=in_array($nameLast,$str); +if (!$result){ + echo "ļϴ"; +}else{ + echo "ļϴ"; +} \ No newline at end of file -- Gitee From d7a3683f8f4bea1fd25f82c5981c38c2bdb05325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=87=8C=E8=8A=9D?= <2054884274@qq.com> Date: Sun, 22 May 2022 05:52:55 +0000 Subject: [PATCH 3/3] aa z --- .../20220517php\346\226\271\346\263\225.php" | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 "\351\231\210\345\207\214\350\212\235/20220517php\346\226\271\346\263\225.php" diff --git "a/\351\231\210\345\207\214\350\212\235/20220517php\346\226\271\346\263\225.php" "b/\351\231\210\345\207\214\350\212\235/20220517php\346\226\271\346\263\225.php" new file mode 100644 index 0000000..5913347 --- /dev/null +++ "b/\351\231\210\345\207\214\350\212\235/20220517php\346\226\271\346\263\225.php" @@ -0,0 +1,178 @@ +```php +brand=$brand; + $this->price=$price; + + } + + /** + * @return mixed + */ + public function getBrand() + { + return $this->brand; + } + + /** + * @param mixed $brand + */ + public function setBrand($brand) + { + $this->brand = $brand; + } + + /** + * @return mixed + */ + public function getPrice() + { + return $this->price; + } + + /** + * @param mixed $price + */ + public function setPrice($price) + { + $this->price = $price; + } + + function show(){ + echo "ǣ".$this->brand."ļ۸Ϊ".$this->price; + } + +} + +$a=new Car("","39999"); +$a->show(); + +echo "
"; +//2ĻΪඨһࡪܳࡣΪʵ󲢷ʸԡ + +class SportsCar extends Car { + + function __construct($brand, $price) + { + parent::__construct($brand, $price); + } + + function cool(){ + echo "dzĿ"; + } + +} + +$b = new Sportscar("˹˹","9000000"); +echo "ǣ".$this->brand."ļ۸Ϊ".$this->price; +$b->cool(); +echo "
"; +/3һֱ࣬3Ժͷ3ܱԺͷ3˽Ժͷ +class A{ + +// +public $name; +public $age; +public $sex; + function eat(){ + echo "Է"; + } + + function sleep(){ + echo "˯"; + } + + function skill(){// + echo "˺"; + } +//ܱ +protected $height;// +protected $weight;// +protected $address;//ַ + protected function face(){ + echo "ʶ"; + } + protected function short(){ + echo "֤"; + } + protected function information(){ + echo "д֤Ϣ"; + } + +//˽е +private $grade;//ɼ +private $classname;//༶ +private $id;//ѧ + /** + * @return mixed + */ + public function getGrade() + { + return $this->grade; + } + + /** + * @param mixed $grade + */ + public function setGrade($grade): void + { + $this->grade = $grade; + } + + /** + * @return mixed + */ + public function getClassname() + { + return $this->classname; + } + + /** + * @param mixed $classname + */ + public function setClassnamel($classname): void + { + $this->classname = $classname; + } + + /** + * @return mixed + */ + public function getId() + { + return $this->id; + } + + /** + * @param mixed $id + */ + public function setId($id): void + { + $this->id = $id; + } + + private function money{ + echo "ỨǮ"; + } + private function book{ + echo "ῴ"; + } + private function attendclass{ + echo "רҵ"; + } + +} + +``` + + + + +} \ No newline at end of file -- Gitee