<?php/** *///准备数组,代替从数据库中检索出的数据(共有三个必须字段id,name,pid)header("content-type:text/html;charset=utf-8");$categories = array( array('id'=>1,'name'=>'电脑','pid'=>0), array(&
安装vagrant//添加虚拟机使用命令vagrant box add laravel/homestead//克隆homesteadgit clone https://github.com/laravel/homestead.git ./homestead//初始化homesteadbash init.sh//编辑homestead.ymal文件,添加站点、目录共享、指定php版本等---ip: "192.168.10.10"memory: 4096cpus: 1provid
因工作需要使用异步任务,来应对接口大量请求,此处是示例。<?php$serv = new Swoole\Http\Server("0.0.0.0", 9501);$serv->on('request', function ($request, $response) use ($serv) { //投放任务 $serv->task('接收票务数据');}); &nb
<?phpclass DBdic{ public $database = array(); //数据库配置 public $tables = array(); //读取的表信息数组 public $htmlTable = ''; //表格内容 public $html = ''; public $exportTables = ar
USE information_schema; --切记这里不能忘掉SELECTT.TABLE_SCHEMA AS '数据库名称', T.TABLE_NAME AS '表名', T.TABLE_TYPE AS '表类型', T. ENGINE AS '数据库引擎', C.ORDINAL_P