因素其实不多的:
1 D:\xampp\apache\conf 在这个
文件夹下 httpd.conf 这个
配置文件你要确定没改过
其中的
ServerRoot "/xampp/apache"
还有监听的
80端口也是很重要的
如果你之前装过SQL 服务器他会占用的你的80端口,可以修改文件里面的80改成 (例如81)
2 D:\xampp\apache\conf\extra 这里有个httpd.vhost文件也是一个重要的配置
<VirtualHost *:80>
Options None
DocumentRoot D:\xampp\htdocs 确定这个下面 有Index.php 才能找到
ServerName 你配置的虚拟域名
DirectoryIndex index.php index.html index.htm
<Directory />
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "D:\xampp\htdocs\"> 确定这个下面 有Index.php 程序才能找到
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
3,没有东西的话,试试在Localhost/你的控制器的名字
例如localhost/message
万分不行,重装,然后在htdocs文件夹下,先删掉所有,再把你的东西放进去本回答被提问者采纳