06 2020 档案
摘要:<?php //这是父类 // class father{ // public $i='人';//共有的在哪里都可以访问,不写就默认是这个 // // protected $i = '人';//这个是受保护的只能在自己类和子类中访问 // // private $i = '人';//这个是私有的只能
阅读全文
摘要:<?php // namespace a { // const a='定义常量'; //这是在命名空间里定义常量 // function a(){ // echo 'a<br>'; // } // } // namespace b { // function b(){ // // echo 'b';
阅读全文
摘要:1.实现分页 下面的内容是写在列表页面的 <?php // 分页 $key = isset($_GET['key'])?$_GET['key']:'';//这是查询 key是从form表单传上来的 然后判断text里面的值用来做模糊查询 // var_dump($key); $page = isse
阅读全文
摘要:添加产品layui图片上传 1.表单页面 这是把内容上传到数据库 <?php if($_POST){ $title = $_POST['title']; $intro = $_POST['desc']; $content = $_POST['content']; $uname = $_POST['i
阅读全文
摘要:<?php 登陆页面 if($_POST){ // 接受提交过来的数据 $uname = trim($_POST['uname']); $pasd = md5($_POST['pasd']); // 查询数据库 $conn = new mysqli('localhost','root','root'
阅读全文
摘要:<?php// 链接数据库//赋值给变量 实例化类 ip地址 用户名 密码 数据库名称$conn = new mysqli('localhost','root','root','edu'); //判断链接是否成功//if($conn->connect_error){ //die的意思是输出这句后 后
阅读全文
摘要:1.模糊查询 select * from 表名 where 字段 like ‘%w%’; select * from grade where name like '%java%'; %号中间写查询数据的内容 这个用的比较多 select * from grade where name like 'j
阅读全文

浙公网安备 33010602011771号