1、首先打开xampp工具。
2、再更改Apache的端口为8080.
3、启动Apache服务。
4、接着打开xampp工具,新建PHP文件。
5、再编写php文件代码。
6、最后保存htdocs文件夹,就可以运行PHP文件。