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

启动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

双击redis-server.exe启动radis

这里写图片描述

注意

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


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

这里写图片描述


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

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

这里写图片描述


重启xampp 即可

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kingrome2017/article/details/74347818
文章标签: xampp php mysql
个人分类: xampp
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

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

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭