用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4688|回复: 2
收起左侧

[Others] define一些宏如何使用?

[复制链接]
发表于 2008-10-17 12:18:36 | 显示全部楼层 |阅读模式
在model或者lib中没法用啊....
function test(){
                $this->load->library("DebugOut");
        }
提示:
A PHP Error was encountered
Severity: Notice

Message: Use of undefined constant ABC_CRITICAL - assumed 'ABC_CRITICAL'

Filename: libraries/Loader.php

Line Number: 873
发表于 2008-10-17 14:33:09 | 显示全部楼层
宏定义直接使用, 不需要 ->  这样的符号

例如DebugOut ,直接 拿来用  echo  DebugOut .'something' ;
发表于 2008-10-17 15:28:45 | 显示全部楼层
对,引用宏定义不需要引号。

本版积分规则