* [ ] 單獨加載使用
* 比如Worker定時器要加載項目中的類時可以使用
```
OpenLoad($ItemDir = null, $Type = null)
```
ItemDir(string|array):項目位置(null默認當前位置)
Type (string|null):項目配置類型或者配置文件位置(支持json類型),`array=使用項目Config/Config.php配置`
*****
```
<?php
//引加文件
require_once __DIR__ . '/zqphp/AutoLoad.php';
\zqphp\AutoLoad::OpenLoad(); //默認為載加當前目錄,PhpDir為空
\index::main(); //index類的main方法
```
```
<?php
//說明例
require_once __DIR__ . '/zqphp/AutoLoad.php';
use \zqphp\AutoLoad, Workerman\Worker;
AutoLoad::OpenLoad(__DIR__ . '/application', true);
$HttpObj = new Worker("http://0.0.0.0:2345");
$HttpObj->count = 4;
$HttpObj->onMessage = function ($Obj) {
/**
* 這里可以調application項目里面的類使用(只支持數據類)方法里面不能有SendFile,SendData
* OpenLoad簡單來說就是在Worker加載類上多了一個功能,就是可以加載項目的類
*/
//dump(Request::get());//請求類方法可以在這里使用
$Obj->send('hello world');
};
Worker::runAll();
```
- 開始使用
- 配置文件
- 路由模式
- AutoLoad類
- 啟動文件
- __construct
- SetRouting
- SetAlias
- SetStop
- SetError
- Access
- SetWorker
- SetClassFile
- SetClassDir
- Run
- OpenLoad
- LinuxStartAll
- Session類
- 使用說明
- set
- get
- delete
- pull
- has
- id
- Cookie類
- 使用說明
- set
- get
- delete
- pull
- has
- TempLets類
- 模板語法
- 模板標簽
- html
- show
- assign
- obtain
- Request類
- get
- post
- host
- referer
- getip
- localip
- header
- body
- file
- scheme
- protocolversion
- uri
- path
- querystring
- method
- Response
- SendFile
- FileStream
- SendData
- SetStatus
- SetHead
- SetMime
- WebSend
- redirect
- dumpJson
- dump
- come
- ps
- Frame類
- GetWeb
- ViewFile
- RoutingData
- SetClassFile
- SetClassDir
- GetMime
- FileMime
- LoadDir
- StartDir
- IsJson
- ArrJson
- JsonFormat
- ObStart
- GetConfig
- ConfigDir
- TempDir
- GetRunData
- GetStatic
- IsDebug
- SetDebug
- GetDebugInfo
- GlobalVariables類
- 使用說明
- set
- get
- delete
- pull
- has
- id
- Mysql類
- 新版本
- 第三方
- Thinkorm
- Medoo
- 舊版本
- Mysql 配置格式
- 項目中操作數據庫
- 項目場景
- 項目數據庫配置
- 項目數據庫中間類
- 項目中操作數據表
- 連貫操作
- where
- table
- data
- order
- field
- limit
- page
- group
- having
- join
- tabname
- union
- sql
- link
- link_base
- lock
- CURD 操作
- 寫入數據
- 數據刪除
- 數據查詢
- 數據更新
- 數據統計操作
- count
- sum
- max
- min
- avg
- 操作DEMO
- CurdTrait.php
- 項目Model層操作表.md
- Curl類
- Method類
- SslAes類
- layui_zqadmin