安装xampp及配置
1、双击,安装,一直next向下
2、apache配置
增加监听接口
Listen 89 Listen 8888 Listen 8889
修改项目目录
DocumentRoot "E:\www" <Directory "E:\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.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks Includes ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Require all granted </Directory>
增加多端口映射目录
<VirtualHost *:8888> ServerName http://localhost:8888/ DocumentRoot "/www" <Directory "E:/www/"> AllowOverride All Options Indexes FollowSymLinks Require all granted </Directory> </VirtualHost> <VirtualHost *:8889> ServerName http://localhost:8889/ DocumentRoot "E:/RK/soft-test" <Directory "/RK/"> AllowOverride All Options Indexes FollowSymLinks Require all granted </Directory> </VirtualHost>
启动apache
测试apache服务:www目录下新建文件“index.php”
<?php echo phpinfo();
3、mysql配置:设置密码
1. 关闭正在运行的MySQL服务。
2. 打开DOS窗口,转到mysql\bin目录。
3. 输入mysqld --skip-grant-tables 回车。--skip-grant-tables 的意思是启动MySQL服务的时候跳过权限表认证。
4. 再开一个DOS窗口(因为刚才那个DOS窗口已经不能动了),转到mysql\bin目录。
5. 输入mysql回车,如果成功,将出现MySQL提示符 >。
6. 连接权限数据库: use mysql; 。
6. 改密码:update user set password=password("123") where user="root";(别忘了最后加分号) 。
7. 刷新权限(必须步骤):flush privileges; 。
8. 退出 quit。
4、php警告配置
Warning: mysqli_query() expects parameter 3 to be int, object given in F:\www\mywww\php\DBDAmysql.php on line 36 Warning: mysqli_query() expects parameter 3 to be int, object given in F:\www\mywww\php\DBDAmysql.php on line 36 Notice: Undefined index: datatable in F:\www\mywww\php\savemysql.php on line 11 Warning: mysqli_query() expects parameter 3 to be int, object given in F:\www\mywww\php\DBDAmysql.php on line 470
编辑php.ini ,查找"display_errors =" ,将“=”后面的值改为"off。