摘要: 1、构造函数:__construct(): 构造函数是类中的一个特殊函数,当a56爆大奖在线娱乐们使用new关键字实例化对象时,相当于调用了类的构造函数。 function __construct($name){ $this -> name = $name; } 2、析构函数:__destruct(): ①析构函数在 阅读全文
posted @ 2021-06-18 18:18 王越666 阅读(382) 评论(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 阅读(42) 评论(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 阅读(40) 评论(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 阅读(113) 评论(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 阅读(113) 评论(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 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 连接数据库操作 /*连接mysql*/ mysql -h 地址 -P 端口 -u 用户名 -p 密码 例如: mysql -h 127.0.0.1 -P 3306 -u root -p **** /*退出mysql*/ exit; 数据库操作 #数据库操作 /*关键字:create 创建数据库(增) 阅读全文
posted @ 2021-06-15 17:22 王越666 阅读(40) 评论(0) 推荐(0) 编辑
摘要: <?php//1、连接数据库$link = mysqli_connect('127.0.0.1','root','root','1906');//2、设置字符集mysqli_set_charset($link,'utf8');//3、拼写SQL语句$sql = "select * from cla" 阅读全文
posted @ 2021-06-11 19:33 王越666 阅读(69) 评论(0) 推荐(0) 编辑