* [ ] 獲取View視圖文件
返回絕對路徑文件名,如要支持Worker請使用require 引入
```
Frame::ViewFile($File = null, $Type = false);
```
*****
File(null|string|bool):文件名 `@開頭=zqphp框架目錄,#開頭=啟動目錄,~開頭=項目目錄,/開頭=View根目錄`
Type(bool):是否生成靜態 (Config中的生成靜態開關打開了,生成靜態才生效)
*****
如訪問index/main使用此方法
```
<?php
//寫法1
class index{
public function main() {
echo 'Hello';
//默認當前類和方法名View文件,可以輸出ViewFile()看一下
require Frame::ViewFile();//不生成靜態
}
}
//返回的是:項目目錄/View/index/main.php
```
```
<?php
//寫法2
class index{
public function main() {
echo 'Hello';
require Frame::ViewFile(true);//生成靜態
}
}
//返回的是:項目目錄/View/index/main.php
```
```
<?php
//寫法3
class index{
public function main() {
echo 'Hello';
require Frame::ViewFile('login');//不生成靜態
}
}
//返回的是:項目目錄/View/index/login.php
```
```
<?php
//寫法4
class index{
public function main() {
echo 'Hello';
require Frame::ViewFile('login',true);//生成靜態
}
}
//返回的是:項目目錄/View/index/login.php
```
```
<?php
//寫法5
class index{
public function main() {
echo 'Hello';
require Frame::ViewFile('/login');
}
}
//返回的是:項目目錄/View/login.php
```
```
<?php
//寫法6
class index{
public function main() {
echo 'Hello';
require Frame::ViewFile('~login');
}
}
//返回的是:項目目錄/login.php
```
```
<?php
//寫法7
class index{
public function main() {
echo 'Hello';
require Frame::ViewFile('#login');
}
}
//返回的是:啟動目錄/login.php
```
- 開始使用
- 配置文件
- 路由模式
- 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