windows下php开发环境的搭建
环境搭建软件组合为:Apache2.2.9mysql5.2.32php5.2.6 下载地址如下 http://download.csdn.net/detail/xttxqjfg/5670455 appserv-win32-2.5.10集成安装 http://download.csdn.net/detail/xttxqjfg/5670447 mysql-5.5.32-win32.msi http://download.csdn.net/
环境搭建软件组合为:Apache2.2.9+mysql5.2.32+php5.2.6 下载地址如下
http://download.csdn.net/detail/xttxqjfg/5670455 appserv-win32-2.5.10集成安装
http://download.csdn.net/detail/xttxqjfg/5670447 mysql-5.5.32-win32.msi
http://download.csdn.net/detail/xttxqjfg/5670439 php-5.2.6-Win32.zip
http://download.csdn.net/detail/xttxqjfg/5670431 apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi
安装apache2.2
下载附件中的安装文件,点击运行安装,安装过程中需要注意的将安装目录指定到安装前准备的文件夹中wamp/apache,安装完成后运行apache,在浏览器中输入localhost,如果显示it works则表示安装成功,否则安装失败。
安装mysql5.1
Mysql的安装比较复杂,详细步骤就不描述了,下面是在网上找到的一个比较详细的安装步骤。主要安装目录也放到准备前建立的目录内
http://www.jb51.net/article/23876.htm
打开mysql客户端登陆界面,输入密码后成功进入则表示安装成功。
安装php
将附件中的php压缩文件夹解压到准备前php5文件夹,打开apache的配置文件,在下面字符
#LoadModule vhost_alias_module modules/mod_vhost_alias.so(一般在126行左右)
后面加入
LoadModule php5_module "D:/wamp/php5/php5apache2_2.dll"
找到如下字符串
AddType application/x-gzip .gz .tgz(一般在380行左右)
在后面加入
AddType application/x-httpd-php .php .phtml
PHPIniDir "D:/wamp/php5"
到php5的目录内找到php.ini-recommended,将其改名为php.ini
重启apache服务器,让刚才的配置生效,这一步很重要。
重启过程中没有报错则配置成功。
在apache2/htdocs文件夹内新建一个test.php文件,内容为
Phpinfo();
?>
在浏览器中输入localhost/test.php看到内容则说明安装正确。
配置与mysql的拓展接口
首先将php5目录下的libmysql.dll复制到windows的安装目录下C:/windows,打开php的配置文件php.ini,就是刚才改名的那个文件。
在第536行左右找到
extension_dir = "./"
将其修改为
extension_dir = "D:/wamp/php5/ext"
在第675行左右找到
;extension=php_mysql.dll
;extension=php_mysqli.dll
将前面的;去掉即可
重启apache服务器对刚才的修改配置生效,在浏览器中输入localhost/test.php,找到mysql说明那块,提示状态为On则表示拓展接口开启成功,其他拓展接口类似,也可自行上网查询。
另外如果嫌以上安装目录麻烦的话可以下载附件中的集成安装包,一键安装php环境
http://download.csdn.net/detail/xttxqjfg/5670455 appserv-win32-2.5.10集成安装

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











PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.
