define和defined
时间:2008-02-27 来源:octans
define -- Defines a named constant
define("CONSTANT", "Hello, world");//定义常量
defined -- Checks whether a given named constant exists
if (defined('CONSTANT')) {
echo CONSTANT;
}
isset(), to see if a variable exists
function_exists(), to see if a function exists
define("CONSTANT", "Hello, world");//定义常量
defined -- Checks whether a given named constant exists
if (defined('CONSTANT')) {
echo CONSTANT;
}
isset(), to see if a variable exists
function_exists(), to see if a function exists
相关阅读 更多 +
排行榜 更多 +