Php平台搭建
这里我们使用PhpMyadmin对Mysql数据库 Gui管理。
使用版本:
apache_2.2.11-win32-x86-no_ssl (msi安装)
mysql-essential-5.1.23-rc-win32(msi安装)
php-5.2.8-Win32
phpMyAdmin-3.0.0-all-languages
1、Apache
1.1、安装Apache
安装Apache时跟其他软件相同,Domain Name 处是可以随便随便填写,以后挂网时可以通过httpd.conf修改
1.2、配置Apache
1.2.1、配置DocumentRoot //配置网站文件的根目录
DocumentRoot "F:\phpmyadmin\phpMyAdmin-3.0.0-all-languages"
注意端口问题。可以通过httpd.conf修改端口 如
Listen 80
注意:在编辑\conf\httpd.conf 配置过程中注意路径是使用"/"不是"\"
修改完成后可以通过打开localhost 或127.0.0.1验证
1.2.2、加载文Php模块 php5apache2_2.dll
LoadModule php5_module "c:/php/php5apache2_2.dll" // 指定该模块文件路径
AddType application/x-httpd-php .php // 指定 php 处理文件类型
AddType application/x-httpd-php .htm // 指定 php 处理文件类型
********************************************************************************
2、Php
PHP作为一种脚本语言容器,作为Apache的一个模块加入到Apache中。当浏览器请求一个PHP页面时,Apache就调用php模块对php源程序进行处理,并将处理的结果返回给浏览器。
2.1 安装PHP
解压php-5.2.8-Win32
解压注意目标文件夹名不能有空格、中文及非ASCII码
2.2 Php配置
2.2.1、修改doc_root 为网站文件路径(与Apache中DocumentRoot相同)
doc_root ="f:\web"
2.2.2
指定扩展模块(dll)路径为 Php解压目录中的ext,Php通过扩展模块方式实现对Mysql、mssql等的支持
extension_dir = "c:\php\ext"
2.2.3 修改扩展模块如(mysql),去掉前面注释号使其有效,修改后如下
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
注意:因为php非安装版所以需要分别复制php_mysql.dll、libmysql.dll、和php.ini(修改后的)到windows、windows\system32、及windows\system32两个目录
另外还需要注意以下问题:
添加系统环境变量PATH C:\php;C:\php\ext 这两个安装目录的路径
Php安装完成后可以通过以下脚本验证PHP信息
phpinfo();
?>
***********************************************************************************
3、安装Mysql
1、一路NEXT,到选择语言项时,选择BEST,及编码为utf8
2、使用MySQL Server Instance Config Wizard初始化配置时,current password 默认为空,此时产生的用户名默认为root
3、安装完全后,可以通过MySQL Command Line Client 进行检验
***********************************************************
4、安装PhpMyadmin
PhpMyadmin 通过登陆网站形式链接mysql数据库对其进行图形界面管理(GUI)
4.1安装
4.1.1、将phpmyadmin全部文件解压到网站根目录,即访问文件在根目录,方便直接使用phpadmin路径
4.1.2、修改config.sample.inc.php中验证类型为HTTP
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
phpmyadmin完成后可以通过 [url]http://localhost/phpmyadmin[/url]进行测试及数据库管理

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics





Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
