Home  >  Article  >  Backend Development  >  thinkphp中的有关问题

thinkphp中的有关问题

WBOY
WBOYOriginal
2016-06-13 13:49:14864browse

thinkphp中的问题
thinkphp中_app_或者app_name都不能显示路径是回事?在页面中如果使用?我试了好几种方式都不行
1 :直接使用 _app_ or app_name
2 : echo _app_ or app_name>
3 : echo $_app_ or $app_name>

开发中需要取到项目的路径。不知道如何取?请赐教

------解决方案--------------------
大写。
回复内容太短了!回复内容太短了!回复内容太短了!回复内容太短了!回复内容太短了!
------解决方案--------------------
入口路径用__APP__,当前模块路径用__URL__,够你用的了,不会有错
------解决方案--------------------
getcwd()
------解决方案--------------------
__APP__ 直接写html页面,__ 是两个_ 合起来的 如果写路径就 __APP__/路径
------解决方案--------------------
大写、双下划线
------解决方案--------------------
大写、双下划线
------解决方案--------------------
__URL__ __APP__ __ROOT__ 这些都能够再摸版中自动解析的 在控制器了写 $this->disiplay()
看看 地址栏里输入 127.0.0.1/index.php/index/index 看看有没有效果
------解决方案--------------------
test
这样写,不要 echo >等什么的
------解决方案--------------------
大写,又下划线

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn