0

我不知道该怎么做。

我的小网站只有一个入口;目前只能通过旧方式访问 URL,即

?action = anything

我需要在我的索引页面顶部有一个 PHP 函数,以便能够执行以下操作:

 /register
 /{user}/edit
 /{product}

你明白了。

这是我的索引代码片段:

switch($action)
{
    case '/':
        include('../app/views.php');
        break;

    case 'contact':
        include('../app/form.php');
        break;

    //auth start here
    case 'register':
        include('../app/register.php');
        break;
}

谢谢!

4

0 回答 0