カスタムルートはに正しく、常にルートを動作しませんuser.htmカスタムルーティングが正しく動作しません[F3]
のindex.php
$routes = [
"/" => "index.htm",
"/user/[email protected]" => "user.htm","/user/@id" => "user.htm",
];
foreach ($routes as $path => $file) {
$f3->route("GET ".$path,
function($f3){
global $file,$path;
echo View::instance()->render($file);
}
);
}
ありがとうございました。しかし、これがなぜ機能するのか、私が使っている方法はどういうものなのか詳しく教えてもらえますか?もう一度ありがとう:D –