Home  >  Article  >  Backend Development  >  thinkphp中的奇怪写法解决思路

thinkphp中的奇怪写法解决思路

WBOY
WBOYOriginal
2016-06-13 12:21:02947browse

thinkphp中的奇怪写法
下图中 THEME_PATH.C(':AYOUT_NAME')这种写法为啥在THEME_PATH和C间加个点,这个点代表啥意思

------解决思路----------------------
沒什麼奇怪的,就是字符串連接符。

<br />define('THEME_PATH','abc');<br /><br />function C($s){<br />    return $s;<br />}<br /><br />$str = THEME_PATH.C('LAYOUT_NAME');  //abcLAYOUT_NAME<br />echo $str;<br />

------解决思路----------------------
THEME_PATH 是常量  C取值是字符串, 两个字符串用串接符.来串接;

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