ファイルがたくさんありphpます。
それぞれにアクセスするphpには、パラメータを使用しています。
例:index.php?route=changepassword、、index.php?route=aboutusなど
パラメータをroute.php正しいファイルにリンクする必要があります
使用する方が良い
If-Else statement
$route = $_GET['route'];
if ($route==changepassword) {
//statement
} else if ($route==aboutus) {
//statement
}
使用のswitch-case?
$route = $_GET['route'];
switch ($route) {
case "changepassword" :
//statement
break;
case "aboutus" :
//statement
break;
}
これはたった2つのファイルです。10以上のファイルがあります。何を使用するのが良いですか?