我正在开发我的第一个独立 Web 应用程序,我遇到了路由问题。例如,我的索引位于sites/folder/folder/index.php,因此它的 url 将是http://site.com/folder/folder/index.php。那么什么是最好的方法index.php呢?只是使用for或foreach直到index.php找到或可能有更好的方法?
我正在开发我的第一个独立 Web 应用程序,我遇到了路由问题。例如,我的索引位于sites/folder/folder/index.php,因此它的 url 将是http://site.com/folder/folder/index.php。那么什么是最好的方法index.php呢?只是使用for或foreach直到index.php找到或可能有更好的方法?