【发布时间】:2011-05-23 02:20:55
【问题描述】:
我有以下代码示例,它在运行时会产生包含常量的错误。有人可以告诉我这是哪里出错了吗?
class Template {
private $headers = "<link rel=\"stylesheet\" type=\"text/css\"
href=\"" . ROOT . "system/stylesheets/universal.css\" />";
... More variables and methods
}
这是我收到的错误。我确信 ROOT 常量是在这个类之外定义的:
Parse error: syntax error, unexpected '.', expecting ',' or ';' in <page.php> on line <line number>
感谢您的宝贵时间,
spryno724
【问题讨论】: