Heim  >  Artikel  >  Backend-Entwicklung  >  部署PHP项目应该注意的几点_PHP教程

部署PHP项目应该注意的几点_PHP教程

WBOY
WBOYOriginal
2016-07-13 17:18:47760Durchsuche

在部署PHP项目时,有几点需要特别注意,也是初学者比较容易忽视的点:

一、下载WAMPServer后,如何安装配置?

二、如何通过客户端管理MySQL数据库?

三、如何通过IP地址访问PHP网站,如果在局域网内部访问服务器上的PHP网站?


针对第一点,注意以下内容:

1、下载WAMPServer,地址可以自己去找;

2、安装WAMPServer

3、此时PHP、Apache、MySQL都已经装好,甚至可以立即访问http://localhost,也可以通过phpMyAdmin访问到MySQL数据库;

4、如果要开启伪静态,需要做如下操作:

加载Rewrite模块:

在conf目录下httpd.conf中找到

LoadModule rewrite_module modules/mod_rewrite.so
将前面的注释#去掉

许在任何目录中使用“.htaccess”文件,将“AllowOverride”改成“All”(默认为“None”):

# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All


针对第二点,注意以下内容:

1、通过phpMyAdmin,找到用户菜单,修改MySQL密码(默认密码为空)

2、下载Navicat对MySQL进行管理


针对第三点,注意以下内容:

1、允许IP地址访问(默认都只允许127.0.0.1访问):

在Apache的配置文件httpd.conf找到如下内容,将Deny from all这一行注释掉

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
再找到最后一行的#Include "D:/wamp/alias/*"进行注释。


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/621620.htmlTechArticle在部署PHP项目时,有几点需要特别注意,也是初学者比较容易忽视的点: 一、下载WAMPServer后,如何安装配置? 二、如何通过客户端管理...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn