Home >Backend Development >PHP Tutorial >thinkphp中的奇怪写法

thinkphp中的奇怪写法

WBOY
WBOYOriginal
2016-06-23 13:33:42945browse

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


回复讨论(解决方案)

?什?奇怪的,就是字符串?接符。

define('THEME_PATH','abc');function C($s){    return $s;}$str = THEME_PATH.C('LAYOUT_NAME');  //abcLAYOUT_NAMEecho $str;

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