我在 php-silex 中有一个项目,但我正在使用这个框架。我创建了一些路线,但有些不起作用。这里有一些例子:
/*
**INIT HERE & SOME OTHER CODE
*/
$app->match('letter-{letter}', function($letter) use()
{
echo 'With dash';
});
$app->match('letter_{letter}', function($letter) use()
{
echo 'With underscore';
});
$app->match('{other}', function($other) use()
{
echo 'Other view';
});
如果我输入 /letter-a 输出是 'Width dash' 但如果我输入 '/letter_a' 输出是 'Other view' 而不是 'Width underscore'。
我想知道为什么会发生这种情况以及如何显示“宽度下划线”?