摘要:// 动物 父类 class anmials{ var $i='anm'; function aa(){ echo'动物'; } } // 猪 子类 class pig extends anmials{ var $p='zhu'; function aa(){ echo '猪八戒'; // 方法重写
阅读全文
摘要:1、require require_once跟require的区别是会检查文件是否已经被包含过,如果是则不会再次被包含; 2、include include_once跟include的区别是会检查文件是否已经被包含过,如果是则不会再次被包含; 运用在某几个页面,抬头结尾都一样的 时候
阅读全文
摘要:1: 设置时区:date_default_timezone_set('Asia/ShangHai'); 2: 时间函数 date() date ( string $format [, int $timestamp ] ) format:必需。规定时间的格式。Y-m-d H:i:s; 3.时间函数 t
阅读全文
摘要:php中的删除 php代码 $('.del').click(function(){ var id = $(this).data('id'); var that = $(this); layer.confirm('确定删除' + id + '吗?', { icon: 3, title: '提示' },
阅读全文
摘要:<?php // $conn=new mysqli('localhost','root','root','qiyewangzhan'); // $sql="select * from product"; // $res=$conn->query($sql); // $list=$res->fetch
阅读全文
摘要:1.接受数据 if($_POST){ $uname = trim($_POST['uname']); $pasd = md5($_POST['pasd']); 2.查询数据库 $conn = new mysqli('localhost','root','root','qiye'); $sql = "
阅读全文
摘要:// 连接数据库 // $abc=new mysqli('localhost','root','root','对应的数据库名'); // $abc->query(sq语句); // if($abc->connect_error){ // die('连接失败'.'$abc->connect_error
阅读全文
摘要:今天学到了 数据库的几个查询功能: 1.模糊查询 select * from 表名 where 字段 like ‘%w%’; 加了%之后表示后面或者前面必须有文字; select * from 表名 where 字段 like ‘李_’; 加了_之后表示后面或者前面必须有文字; 2.去重复数据 se
阅读全文