Php Fresh Yii样板项目报告错误
我已经使用Yii生成了一个新项目-样板(Haml分支),但有一个错误:Php Fresh Yii样板项目报告错误,php,yii,haml,yii-extensions,Php,Yii,Haml,Yii Extensions,我已经使用Yii生成了一个新项目-样板(Haml分支),但有一个错误: Use of undefined constant HAMLPHP_ROOT - assumed 'HAMLPHP_ROOT' in \yii-boilerplate\protected\extensions\yiihppie\vendors\HamlPHP\src\HamlPHP\Lang\Nodes\DoctypeNode.php. 有什么建议可以解决吗 更新:HAMLPHP\u ROOT已在\yii样板文件\pr
Use of undefined constant HAMLPHP_ROOT - assumed 'HAMLPHP_ROOT' in \yii-boilerplate\protected\extensions\yiihppie\vendors\HamlPHP\src\HamlPHP\Lang\Nodes\DoctypeNode.php.
有什么建议可以解决吗
更新:HAMLPHP\u ROOT
已在\yii样板文件\protected\extensions\yiihpie\vendors\HAMLPHP\src\HAMLPHP\Config.php中定义为
define('HAMLPHP_ROOT', dirname(__FILE__).DIRECTORY_SEPARATOR);
在index.php或config.php中定义常量HAMLPHP_ROOT的定义最后我设法解决了这个问题。问题是\yii样板文件\protected\extensions\yiihpie\vendors\HamlPHP\src\HamlPHP\HamlPHP.php
包含错误的Config.php
require_once 'Config.php';
它实际上包括Pear目录中的Config.php
,而不是当前目录中的。因此,我明确地将其指定为
require_once dirname(__FILE__) . '/Config.php';
它是有效的