美文网首页我爱编程
3、配置服务器

3、配置服务器

作者: Clayten | 来源:发表于2018-04-01 20:52 被阅读0次

1.PHP时区配置

PHP预处理器默认使用UTC(世界标准时间,中国的时间与UTC时差为+8,即UTC+8)调用时间函数产生的时间与实际时间相差8小时 demo1-2.png

(1)单击系统托盘WampServer图标,选择“PHP—>php.ini”,打开php.ini配置文件

(2)在php.ini文件中查找关键字“UTC”。

(3)将PHP时区配置改为:date.timezone = PRC

demo1-3.png

(4)重启Apache服务。

2.PHP预处理器其他常用配置

short_open_tag = On: 表示允许使用"<?","?>"作为PHP的开始标记和结束标记
ouyput_buffering = On: 表示允许使用页面缓存。
display_errors = On:表示打开错误提示

3.设置允许外网访问Apache服务

(1)单击系统托盘WampServer图标,选择“Apache—>httpd.conf”,打开httpd.conf配置文件

(2)查找关键字"Allow from loclhost",在“Allow from localost”下输入“Allow from all”,保存httpd.conf文件

4.设置Apache服务端口号

(1)在httpd.conf配置文件中查找关键字 "Listen 80"

demo1-4.png

(2)重启Apache服务器

相关文章

网友评论

    本文标题:3、配置服务器

    本文链接:https://www.haomeiwen.com/subject/xamacftx.html