Blogger Information
汇享科技
Blog
43
fans
4
comment
0
visits
19003
integral:0
P beans:86
  • List of blog posts
  • VUE安装/VUE基础指令

    1.安装VUE 安装vue需要借助vue脚手架vue cli 安装脚手架需要用到npm或者yarn,mpm安装需要先进行安装node.js nodejs安装地址nodejs.org 安装完成之后可以通过node -v查看是否安装成功 然后使用npm...

    2022-09-02 12:36 Read 503 comment 0
  • thinkphp多应用/模型中的搜索器/门面类/助手函数

    模型中的搜索器 public function sele() { // withSearch 用来触发搜索器 传两个参数 第一个是搜索的字段是哪个 第二个是关联数组 键是字段名 值是要搜索的关键字 $re...

    2022-09-01 12:05 Read 417 comment 0
  • thinkphp联表查询/模型创建/模型配置

    1.链表查询 join $ret = Db::table('user u') ->join('info i', 'u.id = i.owner') ->select() ...

    2022-08-31 11:49 Read 517 comment 0
  • thinkphp高级数据查询/请求示例

    1. 高级数据查询 where条件查询 符号查询 [,=,] id大于2 和id小于7的 $res = Db::table('user')->where('id', '>', 2)->where('id', '

    2022-08-30 14:50 Read 668 comment 0
  • thinkphp安装配置/数据库的增删改查

    1. 安装thinkphp使用composer进行安装composer create-project topthink/think tp 2. 数据库配置链接找到config目录下的database.php文件进行配置 3. 数据库操作 增删改查 ...

    2022-08-30 10:14 Read 375 comment 0
  • PHP之MVC底层实现

    MVC框架Model:模型类,数据库操作View:视图类,展示到客户端Controller:控制器,协调模型与视图 MVC目录架构: 具体代码如下: Model.php namespace core;use PDO;abstract class ...

    2022-08-25 21:18 Read 610 comment 0
  • PHP会话控制/简单的登录注册功能

    效果演示没时间美化登录注册界面下次在美化 其他部分代码比较多 就把控制器的代码拿出来了代码部分 heand.php

    2022-08-23 13:06 Read 542 comment 0
  • PHP实现分页功能/分页条的优化

    上一页下一页实现原理: 获取到当前页码 默认是-1或者+1 但是当达到最小值或者最大值的时候也就是1和最大页数的时候此时应该判断 当当前页码小于1的时候进行处理 不会进行查询 我是用js做了个弹出然后返回上一页就可以了 下一页同理 演示效果 代...

    2022-08-20 11:38 Read 418 comment 0
  • PHP之文件上传/单文件/多文件

    1. 单文件上传 效果图如下: 代码如下: //单文件上传// print_r($_FILES);//1.上传文件不能为空if (isset($_FILES['tupian'])) { // 获取到当前的图片原始名 $name = $_...

    2022-08-19 11:54 Read 742 comment 0
  • PHP数据库篇:PDO链接数据库/CURD增删改查操作

    PDO操作 数据库配置文件database.php

    2022-08-18 13:23 Read 351 comment 0
  • PHP类的自动加载器

    类的自动加载器 使用spl_autoload_register进行创建加载器 自动加载器文件autoloader.php

    2022-08-17 14:16 Read 317 comment 0
  • PHP类的继承/抽象类的实现/命名空间

    1. 类的继承扩展 //类的继承/扩展class Demo1{ private int $age = 10; //protected 受保护的,用在当前类或者他的子类中 外部不可见 protected string $name; ...

    2022-08-16 12:15 Read 404 comment 0
  • 文件包含/类与对象

    文件包含 include require引入的文件和当前文件处在同一个作用域当中 如果出现同名变量会覆盖之前的变量区别:引入另一个文件如果有错误 include 会弹出警告错误 但是不会影响后续代码的执行require会抛出致命错误整个文件将无法运行...

    2022-08-13 12:12 Read 338 comment 0
  • PHP数组常用函数

    常用数组函数 // array_merge合并一个或多个数组返回一个新数组$arr1 = [1,5,8];$arr = ['a','b','c'];$res = array_merge($arr,$arr1);printf('%s',print_r(...

    2022-08-12 10:22 Read 414 comment 0
  • PHP字符串函数/函数作用域

    函数作用域 /** * PHP中支持函数作用域不支持块作用域 */ $name = '老张'; //1.关键字globalfunction f1 () :string{ global $name; return 'Hello ...

    2022-08-11 13:18 Read 332 comment 0
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!