您的位置 首页 php

「php」thinkphp5实战(一):界面引入

「php」thinkphp5实战(一):界面引入

后台界面引入 :引入网上的现成模板

建立 Controller ,application/目录/controller,例如index.php。

 namespace appindexcontroller;
 public function index()
 {
 return view();
 }
 

模板View,application/目录/View,默认路径后缀为html。

配置文件只对当前目录起作用,可以建application/目录/config.php

return [
 'template' => [
 // 模板引擎类型 支持 php think 支持扩展
 'view_suffix' => 'htm',
 ],
 'view_replace_str' => [
 '__PUBLIC__'=>'/public/',
 '__ROOT__' => '/',
 '__ADMIN__' => '
 ],
 
];
 

模板文件html中直接调用”__ADMIN__/路径”即可。

引入模板其他方法:

//直接调用think空间,在 thinkphp /library/think目录。
class Index 
{
 public function index()
 {
 $view = new thinkView([
 'view_suffix' => 'htm',
 ]);
 return $view->fetch();
 }
}
//或者引入类,继承类,直接 实例化 
use thinkView;
class Index extends View
{
 public function index()
 {
 $view = new View([
 'view_suffix' => 'htm',
 ]);
 return $view->fetch();
 }
}
//直接引用controller(封装好了)
use thinkController;
class Index extends Controller
{
 public function index()
 {
 return $this->fetch();
 }
}
 

分离模板公共部分, header 和footer,引入公共部分:

目录为同层级目录,这里为application/目录/view/public/header.html

{include file="public/header" /} 
 

文章来源:智云一二三科技

文章标题:「php」thinkphp5实战(一):界面引入

文章地址:https://www.zhihuclub.com/79845.shtml

关于作者: 智云科技

热门文章

评论已关闭

37条评论

  1. The decreased affinity for PDE6 compared to other PDE5 inhibitors may explain the decreased incidence of visual side effects as PDE6 is present in the eye and contributes to color vision

  2. It is recommended to wait at least five minutes after irrigation before checking the pH to ensure that the pH does not rise or fall secondary to retained particulate matter.

  3. As you can see, that s one hell of a list and you should be pretty clear on whether you have any of those symptoms towards the end of the SARMs or steroid cycle 8 had cardiovascular diseases, 51 189 27

  4. Chronic ethanol consumption enhances internalization of alpha1 subunit containing GABAA receptors in cerebral cortex

  5. But raloxifene did not prevent two other serious breast conditions, whereas tamoxifen did reduce their risk by 50 percent Here, we demonstrated for the first time that the SARM RAD140 is a potent AR agonist in breast cancer cells

  6. Mechanism of Action, Chemistry, and In Vitro Activity Clinical History Toxicity Hypersensitivity Asparaginase Pharmacology Drug Interactions

  7. venlor naproxen vs ibuprofen sciatica In Cairo and Istanbul, as I ve seen for myself, more and more women wear the full body chador, whereas a decade ago it was common to see women, maybe most, bare headed and wearing western style clothing Mya jKLoNJQBYKr 6 28 2022

  8. Fertility drugs have increased the chances of a multiple birth, he said, but the medicine Karen Kaschak was taking is not supposed to have that effect Conservatives challenged that the ACA was unconstitutional and it was upheld all the way up to and including the SCOTUS

  9. She should not tape or wrap the patch to her skin or reapply a patch that is partially adhered to clothing

  10. To assess synaptic coupling between IHCs and afferent SGNs in Nptn tm1b mice, we performed whole mount immunolabeling of cochleae, using an anti Ribeye antibody pre synaptic ribbon and an anti GluR2 antibody post synaptic density Fig 6A

  11. malignancy, there is little benefit from administering DDAVP Sample size and number of events were small and did not meet optimal information size

  12. Oh he also takes one brazil nut per day When the time comes, the kingdom of God will distribute them to them, and continue to smuggle them in exchange It is not worthwhile for them to sell them

  13. Lundgren C, Ahlin C, Holmberg L, Amini RM, Fjallskog ML, Blomqvist C 2014 Cyclin E1 is a strong prognostic marker for death from lymph node negative breast cancer

  14. piperacillin tazobactam MIC 16 4 mcg mL, ceftazidime 8 mcg mL, cefepime 8 mcg mL, or aztreonam 8 mcg mL 15 constitute approximately 20 to 60 of carbapenem resistant P Few studies have evaluated the performance of existing BC risk prediction models among women of AA

  15. It s about a 20 to 30 reduction in the risk of developing breast cancer in people that are more active versus those who are less, said Ligibel, who also serves as director of the Leonard P In Bedford Stuyvesant, I got off a C train at Nostrand Avenue and walked a few blocks to the vast old armory building that is now the Bedford Atlantic men s shelter

  16. Collins SP, Levy PD, Lindsell CJ, Pang PS, Storrow AB, Miller CD, Naftilan AJ, Thohan V, Abraham WT, Hiestand B, Filippatos G, Diercks DB, Hollander J, Nowak R, Peacock WF, Gheorghiade M

  17. Depending on cellular contexts, a TF can bind to different TF occupancy and regulate different gene expression programs 18 3 months is the baseline for creating real change when it comes to hormonal issues or helping to regulate the menstrual ovulation cycle

  18. She suggested, for example, that funding bodies could require research teams to include members of the community participating in the clinical research, and then monitor to ensure this requirement is met

  19. B, The percent of RGLs and IPCs combined total NSPCs that show recombination in both reporter genes true or neither true is shown for three TAM groups Doxycycline is a semi synthetic tetracycline invented and clinically developed in the early 1960s by Pfizer Inc

  20. In vivo trastuzumab binds to HER2 and activates NK cells, increases HER2 uptake and processing by DCs, and enhances the generation of CD8 T cells e

网站地图