Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The default http access port of xampp apache is 80
After the modification is completed, restart apache in xampp.
Open Settings/Preferences and find the Build, Execution, Deployment options, click Deployment and add the following:
Because we have modified the default port 80, the port number must be specified here. The directory is /Applications/XAMPP/xamppfiles/etc/httpd.cof. This is the default website running directory of apache, so it must be this directory or its subdirectory.
Test it:
Execute hello.php in the directory of web path (/Applications/XAMPP/htdocs):
<span style="font-size: 16px;"><?<span style="color: #000000;">php </span><span style="color: #008000;">/*</span><span style="color: #008000;">* * Created by PhpStorm. * User: edwin * Date: 2016/10/12 * Time: 上午12:30 </span><span style="color: #008000;">*/</span> <span style="color: #0000ff;">echo</span> 'Hello OK';</span>
You can then access it in the browser, as shown below: