您的位置:首页 > 编程语言 > PHP开发

怎样利用XAMPP搭建本地php环境

2017-07-04 17:42 537 查看
启动xampp



点击mySql的admin



下载mySql 和运维人员要取账号登录



登录成功后,把表复制到本地localhost

注意

新建表的选项:





Hosts文件主要作用是定义IP地址和主机名的映射关系,是一个映射IP地址和主机名的规定。可以用文本文件打开!当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Hosts文件中寻找对应的IP地址,一旦找到,浏览器会立即打开对应网页,如果没有找到,则浏览器会将网址提交DNS服务器进行IP地址解析。这也是提高快速打开网页的方法!





找到如下图文件



代码如下:

# Virtual Hosts
#
# Required modules: mod_log_config

# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.4/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ##ServerName or ##ServerAlias in any <VirtualHost> block.
#
##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host.example.com
##DocumentRoot "C:/xampp/htdocs/dummy-host.example.com"
##ServerName dummy-host.example.com
##ServerAlias www.dummy-host.example.com
##ErrorLog "logs/dummy-host.example.com-error.log"
##CustomLog "logs/dummy-host.example.com-access.log" common
##</VirtualHost>

##<VirtualHost *:80>
##ServerAdmin webmaster@dummy-host2.example.com
##DocumentRoot "C:/xampp/htdocs/dummy-host2.example.com"
##ServerName dummy-host2.example.com
##ErrorLog "logs/dummy-host2.example.com-error.log"
##CustomLog "logs/dummy-host2.example.com-access.log" common
##</VirtualHost>

<VirtualHost *:80>
ServerName yxeplus.com
DocumentRoot "F:/work/yxeplus_web/public"
<Directory "F:/work/yxeplus_web/public">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm index.php
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName yxcfu-web.com
DocumentRoot "F:/work/yxcfu-web/public"
<Directory "F:/work/yxcfu-web/public">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm index.php
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName yxcfu-qbx-web.com
DocumentRoot "F:/work/yxcfu-qbx-api/public"
<Directory "F:/work/yxcfu-qbx-api/public">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm index.php
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerName yxbao2.com
DocumentRoot "F:/work/yxbao-web"
<Directory "F:/work/yxbao-web">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm index.php
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>


下载radis

双击
be68
redis-server.exe启动radis



注意

遇到tp框架会提示radis密码错误解决方案

1.和管理员要取radis密码,文件夹在如下图所示:



2.radis必须从cmd窗口启动:

命令行:cd redis-server.exe空格redis.conf



重启xampp 即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  xampp php mysql
相关文章推荐