在部署PHP项目时,有几点需要特别注意,也是初学者比较容易忽视的点:
一、下载WAMPServer后,如何安装配置?
二、如何通过客户端管理MySQL数据库?
三、如何通过IP地址访问PHP网站,如果在局域网内部访问服务器上的PHP网站?
针对第一点,注意以下内容:
1、下载WAMPServer,地址可以自己去找;
2、安装WAMPServer
3、此时PHP、Apache、MySQL都已经装好,甚至可以立即访问http://localhost,也可以通过phpMyAdmin访问到MySQL数据库;
4、如果要开启伪静态,需要做如下操作:
加载Rewrite模块:
在conf目录下httpd.conf中找到
复制代码 代码如下:
01.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

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools