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

thinkphp中的奇怪写法

WBOY
Release: 2016-06-23 13:33:42
Original
947 people have browsed it

下图中 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;
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