php設(shè)置訪問端口的方法:1、找到并打開httpd.conf配置文件;2、在配置文件中找到Listen 80配置;3、根據(jù)需要修改端口號即可,如Listen 8080。
本文操作環(huán)境:windows10系統(tǒng)、php 7、thinkpad t480電腦。
設(shè)置訪問端口的具體步驟如下所示:
首先使用編輯工具打開 apacheconfhttpd.conf 文件;
然后在文件中找到如下配置:
# Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 #修改這里
最后根據(jù)需要修改端口號即可,如8080。
訪問的時(shí)候在瀏覽器中輸入 ”http:/localhost:修改后的端口號” 即可。
推薦學(xué)習(xí):php培訓(xùn)