【发布时间】:2020-03-20 08:55:29
【问题描述】:
我在使用 Xampp 服务器时遇到了错误 错误是:
Error 404
localhost
Apache/2.4.41 (Win64) OpenSSL/1.0.2s PHP/7.1.33
我的所有文件都位于 htdocs file
index.php 成功打开,但是当我可以从另一个页面 school.php、contact.php、about.php 移动时,它给了我错误 kindle告诉我背后的原因
【问题讨论】:
我在使用 Xampp 服务器时遇到了错误 错误是:
Error 404
localhost
Apache/2.4.41 (Win64) OpenSSL/1.0.2s PHP/7.1.33
我的所有文件都位于 htdocs file
index.php 成功打开,但是当我可以从另一个页面 school.php、contact.php、about.php 移动时,它给了我错误 kindle告诉我背后的原因
【问题讨论】:
XAMPP sets a default as Program Files/Xampp/Htdocs/xampp
YOU ARE ALREADY IN HTDOCS…
try doing ahref=…/ in your directory…see if that works, if not…
try editing your xampp.conf file.
it is located in your xampp/apache folder
mine is (C:/Program Files/Xampp/Apache/conf/extra/xampp.conf)
(it might actually be xampp.htconf or something, but you’ll see it…its the only one with the xampp)…
copy the PhpMyAdmin section, and paste it below.
change the /phpmyadmin to /htdocs or whatever you want to beshown after http://localhost 633.
Then you’ll need to set up the doc root as well, this just tells apache where to serve the file from…
DONT SET UP as HTDOCS though because apache will go in a huge loop and consume all your CPU…i know i’ve tried.
anyway, i have a couple set up…
my document root is soemthing like:
c:/program files/xampp/htdocs/production/kreative
so you will see my main site,
but i have also set up
/phpmyadmin
/xampp
/development(which goes to c:/program files/xampp/htdocs/xampp/development).
Its nice if you add an .htacessfile to those directories you want to use
(like for me the phpmyadmin etc…don’t want my visitors using those).
Hope this helps.
【讨论】: