国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > ThinkPHP > 正文

thinkphp路徑

2024-09-09 15:19:45
字體:
來源:轉載
供稿:網友

標簽: __root__ __self__ __action__ __url__ __app__ __public__

假如你項目首頁的URL是:www.test.com/other/Form

假如當前模塊是:Index

假如當前操作是:index

那么首頁完整的URL:http://www.test.com/other/Form/index.php/Index/index

1__ROOT__:/other/thinkphp/mydemo

2__SELF__:/other/thinkphp/mydemo/Form/index.php

3__ACTION__: /other/thinkphp/mydemo/Form/index.php/Index/index

4__URL__: /other/thinkphp/mydemo/Form/index.php/Index

5__APP__: /other/thinkphp/mydemo/Form/index.php

6__PUBLIC__:/other/thinkphp/mydemo/Public

7../public(不區分大小寫):/other /thinkphp/mydemo/Form/Tpl/default/Public

8. APP_PUBLIC_URL:/other/thinkphp/mydemo/Form/Tpl/default/Public

9. WEB_PUBLIC_URL:/other/thinkphp/mydemo/Public

模板中對路徑部分的操作是這樣子的:

  1. //項目公共目錄   
  2.  $tmplContent = str_ireplace('../public',APP_PUBLIC_URL,$tmplContent);   
  3. //網站公共目錄   
  4. $tmplContent = str_replace('__PUBLIC__',WEB_PUBLIC_URL,$tmplContent);   
  5. //網站根目錄   
  6. $tmplContent = str_replace('__ROOT__',__ROOT__,$tmplContent);   
  7. //當前項目地址   
  8. $tmplContent = str_replace('__APP__',__APP__,$tmplContent);   
  9.  //當前模塊地址   
  10. $tmplContent = str_replace('__URL__',__URL__,$tmplContent);   
  11.  //當前項目操作地址   
  12. $tmplContent = str_replace('__ACTION__',__ACTION__,$tmplContent);   
  13. //當前頁面操作地址   
  14. $tmplContent = str_replace('__SELF__',__SELF__,$tmplContent); 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表

圖片精選

主站蜘蛛池模板: 和林格尔县| 孝昌县| 信宜市| 普宁市| 连云港市| 屏山县| 海阳市| 玉田县| 新巴尔虎右旗| 石家庄市| 西平县| 巫山县| 淅川县| 乐陵市| 齐河县| 庆阳市| 镇原县| 余姚市| 稻城县| 商河县| 磐安县| 浪卡子县| 宜黄县| 潮安县| 深圳市| 中超| 安达市| 临澧县| 酒泉市| 井研县| 仁布县| 嘉峪关市| 彩票| 白银市| 乌什县| 宜城市| 延津县| 易门县| 武乡县| 新建县| 丹寨县|