1
我得到常量(DEPLOYMENT)行上的解析錯誤。爲什麼現在被允許,或者我錯過了什麼。帶有常量的PHP類變量
解析錯誤:解析錯誤,期待` ')'」在
class UploadComponent extends Object {
private $config = array(
'accessKey' => 'XXXX',
'secretKey' => 'XXXX',
'images' => array(
'bucket' => DEPLOYMENT.'-files/images',
'dns' => false
),
'files' => array(
'bucket' => DEPLOYMENT.'-files/files',
'dns' => false
),
'assets' => array(
'bucket' => DEPLOYMENT.'-files/assets',
'dns' => false
)
);
....
}
*(旁註)*您不希望在那裏依賴於全局常量。 – Gordon 2010-10-14 11:21:46
你在哪裏定義「部署」? – pleasedontbelong 2010-10-14 11:21:57
@戈登爲什麼不呢? @pleasedontbelong真的嗎?你的評論有什麼意義。 – Lizard 2010-10-14 11:55:24