php建立方法

编写工具可以从网上下载Sublime Text

一:下载wampserver

二:启动服务:

1.确定 Apache中的Service与MysQL是否启动了;默认端口为80

2.改Apache端口:在Apache中选中httpd.conf,修改Listen与ServerName附近的80前面在加一个80

 

小提示:建议覆盖:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>
复制代码

 

修改成

复制代码
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
    Allow from all

#允许所有访问
    Satisfy all
</Directory>
复制代码

 

 

还有

 

复制代码
<Directory "D:/Wamp5/www">

    #
    # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you.  # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # 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 # # Controls who can get stuff from this server. # # onlineoffline tag - don't remove  Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory>
复制代码

 

修改成

 

复制代码
<Directory "D:/Wamp5/www">

    #
    # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you.  # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # 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 # # Controls who can get stuff from this server. # # onlineoffline tag - don't remove  Order Deny,Allow # Deny from all # Allow from 127.0.0.1 Allow from all </Directory>
复制代码

 

然后保存,重启服务,在访问就解决了这个问题。

 

 

 

 

3.点击Restart All Services重新启动一下服务器图标变为绿色为登录服务器成功

 

三:判断服务是否可用:

1.找到根目录下的安装环境进入www文件夹,进入index.php,运行在浏览器中查看localhost后面加:8080如果出现以下界面说明登录成功

 

2.如果不可用点击设置来设置站点与服务器

 

四:装界面:

1.登录到sql命令行

点击MySQL里面的MySQL console

2.进入MySQL console里面按回车

 

3.用SQL来修改密码:在一行上写use mysql然后回车,出现database changed说明登录成功了

 

4.在写入UPDATE mysql.user SET password=PASSWORD(123) WHERE user='root';然后回车出现ok后关闭

 

5.重新打开MySQL console输入括号里面的密码123就可以了

6.打开SQL数据库建立连接重新启动Restart All Services完成。

 

转载于:https://www.cnblogs.com/hansonglin/p/4956143.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值