Can someone tell me how to fix this error?
Parse error: syntax error, unexpected ‘(‘, expecting ‘,’ or ‘;’ in
/path/folders/etc/domain/protected/controllers/SiteController.php
on line 6
This is what’s on line 6:
const URL = Yii::app()->params['url'];
This works, but I need to define all parameters in a single config file, which is why I changed it to the code above:
const URL = 'http://domain.com/file.php';
From PHP: constant – Manual:
A constant is by definition, constant. If you need to give it a computed value, use a variable instead.