您的位置:首页 > 技术中心 > PHP教程 >

php如何设置访问端口

时间:2022-02-11 13:50

php设置访问端口的方法:1、找到并打开httpd.conf配置文件;2、在配置文件中找到Listen 80配置;3、根据需要修改端口号即可,如Listen 8080。

本文操作环境:windows10系统、php 7、thinkpad t480电脑。

设置访问端口的具体步骤如下所示:

首先使用编辑工具打开 \apache\conf\httpd.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 #修改这里

最后根据需要修改端口号即可,如8080。

访问的时候在浏览器中输入 ”http:/localhost:修改后的端口号” 即可。

推荐学习:php培训

以上就是php如何设置访问端口的详细内容,更多请关注gxlsystem其它相关文章!

本类排行

今日推荐

热门手游