摘要: class rand{ public function and($length){ $sre=''; $str='zcvbm234298'; for ($i=0;$i<$length;$i++){ $sre.=$str[rand(0,strlen($str)-1)]; } return $sre; 阅读全文
posted @ 2021-06-27 19:35 王越666 阅读(227) 评论(0) 推荐(0) 编辑
摘要: //注意要先引入含有封装类的文件文件:如下: <?phpclass Db{ public $host='127.0.0.1'; public $user='root'; public $pass='root'; public $name='day4'; public $link; function 阅读全文
posted @ 2021-06-19 15:43 王越666 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 1、构造函数:__construct(): 构造函数是类中的一个特殊函数,当我们使用new关键字实例化对象时,相当于调用了类的构造函数。 function __construct($name){ $this -> name = $name; } 2、析构函数:__destruct(): ①析构函数在 阅读全文
posted @ 2021-06-18 18:18 王越666 阅读(402) 评论(0) 推荐(0) 编辑
摘要: <?phpclass person{ var $name; var $sex; var $age;//构造方法 function __construct($name, $sex, $age) { //通过构造方法 给传进来的在$name给成员属性$this->name进行赋值 $this->name 阅读全文
posted @ 2021-06-17 09:47 王越666 阅读(43) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" type="text/css" href="css/banner.css"/> </head> <body> <ul 阅读全文
posted @ 2021-06-15 19:32 王越666 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 1、、、、、<?php/** * Created by PhpStorm. * User: Lenovo * Date: 2021/6/7 * Time: 14:04 */?><link rel="stylesheet" href="https://cdn.staticfile.org/twitte 阅读全文
posted @ 2021-06-15 19:28 王越666 阅读(119) 评论(0) 推荐(0) 编辑
摘要: //标红if ($word){foreach ($data as $k=>$v){ $data[$k]['name']=str_replace($word,"<font color='red '>$word</font>",$v['name']);}}//标红 阅读全文
posted @ 2021-06-15 19:23 王越666 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1...注册页面 <form action="zhu.php"method="post"enctype="multipart/form-data"><p> 手机号 <input type="tel" name="tel"required></p> <p> 注册姓名 <input type="tel" 阅读全文
posted @ 2021-06-15 19:21 王越666 阅读(118) 评论(0) 推荐(0) 编辑
摘要: <?php/** * Created by PhpStorm. * User: Lenovo * Date: 2021/6/5 * Time: 14:41 * * */?><form action="zhan.php"method="post"enctype="multipart/form-data 阅读全文
posted @ 2021-06-15 19:11 王越666 阅读(242) 评论(0) 推荐(0) 编辑
摘要: <form action="zhu.php"method="post"enctype="multipart/form-data"><p> 手机号 <input type="tel" name="tel"required></p> <p> 注册姓名 <input type="tel" name="na 阅读全文
posted @ 2021-06-15 19:06 王越666 阅读(186) 评论(0) 推荐(0) 编辑