这里我们使用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]进行测试及数据库管理

PHPidentifiesauser'ssessionusingsessioncookiesandsessionIDs.1)Whensession_start()iscalled,PHPgeneratesauniquesessionIDstoredinacookienamedPHPSESSIDontheuser'sbrowser.2)ThisIDallowsPHPtoretrievesessiondatafromtheserver.

The security of PHP sessions can be achieved through the following measures: 1. Use session_regenerate_id() to regenerate the session ID when the user logs in or is an important operation. 2. Encrypt the transmission session ID through the HTTPS protocol. 3. Use session_save_path() to specify the secure directory to store session data and set permissions correctly.

PHPsessionfilesarestoredinthedirectoryspecifiedbysession.save_path,typically/tmponUnix-likesystemsorC:\Windows\TemponWindows.Tocustomizethis:1)Usesession_save_path()tosetacustomdirectory,ensuringit'swritable;2)Verifythecustomdirectoryexistsandiswrita

ToretrievedatafromaPHPsession,startthesessionwithsession_start()andaccessvariablesinthe$_SESSIONarray.Forexample:1)Startthesession:session_start().2)Retrievedata:$username=$_SESSION['username'];echo"Welcome,".$username;.Sessionsareserver-si

The steps to build an efficient shopping cart system using sessions include: 1) Understand the definition and function of the session. The session is a server-side storage mechanism used to maintain user status across requests; 2) Implement basic session management, such as adding products to the shopping cart; 3) Expand to advanced usage, supporting product quantity management and deletion; 4) Optimize performance and security, by persisting session data and using secure session identifiers.

The article explains how to create, implement, and use interfaces in PHP, focusing on their benefits for code organization and maintainability.

The article discusses the differences between crypt() and password_hash() in PHP for password hashing, focusing on their implementation, security, and suitability for modern web applications.

Article discusses preventing Cross-Site Scripting (XSS) in PHP through input validation, output encoding, and using tools like OWASP ESAPI and HTML Purifier.


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

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

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),

SublimeText3 English version
Recommended: Win version, supports code prompts!

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.
