问题
xampp v3.2.1 do I need to check the service module first so that I can view it on localhost?, because I can't see my sample.php
in localhost.
I noticed the checkbox is disabled:

and another one how do I normally open my sample.php
. the localhost in the browser always
redirect me here: http://localhost/xampp/index.php
..which is the mainsite of xampp. hmm.
Please help, I'm a novice in php using xampp. Google almighty can't find me a solution.
回答1:
You must start the XAMPP Control Panel as Admin. Go to your XAMP directory, usually its C:\XAMPP\, look for the "xampp-control.exe". Right click on that and hit "Run as Administrator." After confirming the UAC or user account control, you should be able to check and install Apache and MySQL as services. That works for me so it should work for you too as I can tell on your screenshot, we run the same version of XAMPP. Goodluck.
回答2:
First of all make sure that you haven't installed XAMPP Lite (and portable) version. Only the full version provide the use of services because Windows needs absolute paths to launch these.
For your redirection problem you will have to tweak apache's configuration files (httpd.conf and/or httpd-xampp.conf). Use the XAMPP Controller's "Config" buttons.
You will have to create aliases for your web folders, see: Apache mod_alias
回答3:
-Just Run "xampp-control.exe" as administrator
-and stop apache service action port.
-and tick this(in snapshot) check box it will ask for install as service just install it
-then go to service.msc where you will see
-new service name as apache2(or similar)
-just set it as automatic if you want it to run as startup.
(this method is for apache for mysql you will do same above steps)
来源:https://stackoverflow.com/questions/20188546/cant-check-services-module-in-xampp