我使用PATH_INFO为页面(前端控制器)提供服务,但是创建链接是一个小问题,因为URL相当于附加到当前URL,而不是直接重定向,所以我在URL中得到了这样的东西:
http://localhost/routing/index.php/user/index.php/user/index.php/user/index.php
echo '<a href="index.php">Home</a> ';
echo '<a href="index.php/user/123">User 123</a>';
我应该如何解决这个问题,一个绝对的url?
在HTML中,要使用绝对路径,必须在路径前面添加斜杠。
例如。CCD_ 1。