URL:
http://localhost/author-多米尼克•奥布莱恩.html
路由:
Route::rule('/author-:name', 'index/index/author');
获取的参数为:
^ array:1 [▼
"name" => "多米尼克"
]
求助,如何获取完整的“多米尼克•奥布莱恩”
http://localhost/author-多米尼克•奥布莱恩.html
Route::rule('/author-:name', 'index/index/author');
^ array:1 [▼
"name" => "多米尼克"
]
求助,如何获取完整的“多米尼克•奥布莱恩”
2 回答1.5k 阅读✓ 已解决
1 回答1.2k 阅读✓ 已解决
2 回答883 阅读✓ 已解决
1 回答1.1k 阅读✓ 已解决
2 回答941 阅读
1 回答920 阅读
1 回答852 阅读
Route::rule('/author-:name', 'index/index/author')->pattern(['name' => '[\w\-\•]+']);
已参与了 SegmentFault 思否社区 10 周年「问答」打卡 ,欢迎正在阅读的你也加入。