06 2021 档案
摘要:public function insert(Request $request){ $parm = $request->except('token'); $this->validate($request, [ 'name' => 'required', 'price' => 'required','
阅读全文
摘要:// 设置路由//展示表单页面Route::get('/week/add','weekController@add');//添加Route::post('/week/insert','weekController@insert');//展示页面Route::get('/week/index','we
阅读全文
摘要:class rand{ public function and($length){ $sre=''; $str='zcvbm234298'; for ($i=0;$i<$length;$i++){ $sre.=$str[rand(0,strlen($str)-1)]; } return $sre;
阅读全文
摘要://注意要先引入含有封装类的文件文件:如下: <?phpclass Db{ public $host='127.0.0.1'; public $user='root'; public $pass='root'; public $name='day4'; public $link; function
阅读全文
摘要:1、构造函数:__construct(): 构造函数是类中的一个特殊函数,当我们使用new关键字实例化对象时,相当于调用了类的构造函数。 function __construct($name){ $this -> name = $name; } 2、析构函数:__destruct(): ①析构函数在
阅读全文
摘要:<?phpclass person{ var $name; var $sex; var $age;//构造方法 function __construct($name, $sex, $age) { //通过构造方法 给传进来的在$name给成员属性$this->name进行赋值 $this->name
阅读全文
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" type="text/css" href="css/banner.css"/> </head> <body> <ul
阅读全文
摘要:1、、、、、<?php/** * Created by PhpStorm. * User: Lenovo * Date: 2021/6/7 * Time: 14:04 */?><link rel="stylesheet" href="https://cdn.staticfile.org/twitte
阅读全文
摘要://标红if ($word){foreach ($data as $k=>$v){ $data[$k]['name']=str_replace($word,"<font color='red '>$word</font>",$v['name']);}}//标红
阅读全文
摘要:1...注册页面 <form action="zhu.php"method="post"enctype="multipart/form-data"><p> 手机号 <input type="tel" name="tel"required></p> <p> 注册姓名 <input type="tel"
阅读全文
摘要:<?php/** * Created by PhpStorm. * User: Lenovo * Date: 2021/6/5 * Time: 14:41 * * */?><form action="zhan.php"method="post"enctype="multipart/form-data
阅读全文
摘要:<form action="zhu.php"method="post"enctype="multipart/form-data"><p> 手机号 <input type="tel" name="tel"required></p> <p> 注册姓名 <input type="tel" name="na
阅读全文
摘要:连接数据库操作 /*连接mysql*/ mysql -h 地址 -P 端口 -u 用户名 -p 密码 例如: mysql -h 127.0.0.1 -P 3306 -u root -p **** /*退出mysql*/ exit; 数据库操作 #数据库操作 /*关键字:create 创建数据库(增)
阅读全文
摘要:<?php//1、连接数据库$link = mysqli_connect('127.0.0.1','root','root','1906');//2、设置字符集mysqli_set_charset($link,'utf8');//3、拼写SQL语句$sql = "select * from cla"
阅读全文
摘要:<?php$name = $_POST['name'];//接收表单数据(接不到图片)$sex = $_POST['sex'];$age = $_POST['age'];$class_id = $_POST['class_id'];//非空验证... /* * 接收图片数据(一维关联数组) * na
阅读全文
摘要:<?php//1、连接数据库$link = mysqli_connect('127.0.0.1','root','root','1906');//2、设置字符集mysqli_set_charset($link,'utf8'); //接收当前页$page = isset($_GET['page'])
阅读全文