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

thinkphp中的奇怪写法解决思路

WBOY
Release: 2016-06-13 12:21:02
Original
980 people have browsed it

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 />
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template