PHP ???? ?? ??
??: ??? ?????
?? ?? ??? ??? ????? ?? ???? ??? ? ????.
??? ??? ??????. ?? ?? ?? ??? ???, ??, ??? ?????, ??? ? ??? ??? ? ????. (?? ??? $ ???? ???? ??? ??? ????)
??: ??? ???? ???? ??? ? ????
?: php ?? ??
define() ?? ??
?? ??:
bool ??( ??? $name , ?? $value [, bool $case_insensitive = false ] )
?? ???? 3?? ????? ????.
1.name: ?? ????, ?? ??, ? ???
2.value: ?? ????, ?? ?
3 . case_insensitive ??? ????, TRUE? ??? ?? ? ??? ????? ???? ????. ???? ????? ?????
<?php header("Content-type: text/html; charset=utf-8"); // 區(qū)分大小寫的常量名 define("GREETING", "歡迎訪問 taobao.com"); echo GREETING; // 輸出 "歡迎訪問 taobao.com" echo '<br>'; echo greeting; // 輸出 "greeting" ?>
??: ????? ????? ??? ?????
????? ???? ??? ???????
<?php header("Content-type: text/html; charset=utf-8"); // 不區(qū)分大小寫的常量名 define("GREETING", "歡迎訪問 taobao.com", true); echo greeting; // 輸出 "歡迎訪問taobao.com" ?>
??: ?? ?? ?? "taobao.com? ?? ?? ?????"? ?????
??? ??? ?? ?? ?? ? ????. ???? ?????.
<?php header("Content-type: text/html; charset=utf-8"); // 不區(qū)分大小寫的常量名 define("GREETING",array(1,2,1,1)); echo greeting; // 輸出 "歡迎訪問淘寶" ?>
?? ???? ?? ??? ?? ? ?? ?? ??? ??????.