【发布时间】:2011-05-08 02:35:56
【问题描述】:
我目前正在研究 ZEND 框架,并在 index.php 中遇到了这个:
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
这个和这个一样吗?
if(!defined('APPLICATION_PATH')){
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
}
我以前从未遇到过这种速记语法。
【问题讨论】:
-
这是我第一次看到这种语法。