0

假设我在“config/custom.php”中有以下数组

return array(
    'svn_host' => "https://MYSERVERNAME",
    'svn_user' => "deployment",
);

现在假设我添加了另一个值,但我想重用同一个数组中的现有值。

return array(
    'svn_host' => "https://MYSERVERNAME",
    'svn_user' => "deployment",
    'cmd' => "svn ls --username [I want to use 'svn_user' here]"
);
4

1 回答 1

0

只需在上面给它一个变量......它是一个黑客,但它会工作

$user = "deployement";
return array(
'svn_host' => "https://MYSERVERNAME",
'svn_user' => $user,
'cmd' => "svn ls --username ".$user
);
于 2013-06-11T18:44:27.227 回答