【发布时间】:2014-01-25 23:57:07
【问题描述】:
当我在我的 URL 栏中输入 localhost/index.php 时,它会将我重定向到这个 URL:localhost/xampp/。为什么会发生这种情况,为什么 localhost/index.php 链接没有将我带到 index.php 页面?
【问题讨论】:
-
是进入配置类型的页面吗?还是它仍然提供
index.php的内容,只是使用那个地址?
当我在我的 URL 栏中输入 localhost/index.php 时,它会将我重定向到这个 URL:localhost/xampp/。为什么会发生这种情况,为什么 localhost/index.php 链接没有将我带到 index.php 页面?
【问题讨论】:
index.php 的内容,只是使用那个地址?
htdocs 是 XAMPP 提供服务的文件夹。如果您查看xampp/htdocs/index.php 的内容,这是localhost/index.php 将解析的内容,您会看到header('Location: '.$uri.'/xampp/'); 行,它基本上将您的浏览器重定向到xampp/htdocs/xampp 的内容。如果地址中未指定index.php 文件,它将默认搜索,因此您最终会找到屏幕截图指向的位置。
有意义吗?
【讨论】: