php5.3.8配备
php5.3.8配置
首先从php的官方网站http://www.php.net/downloads.php 下载windows版本的PHP 5.3.87zip package压缩包
1)、将PHP的压缩包zip解压到一个目录下,如“E:\PHP”;
2)、将PHP目录(E:\PHP)下的 php.ini-production 文件重命名为 php.ini,PHP的配置文件就是它,修改以下几个地方,修改好后把 php.ini 文件复制到 C:\WINDOWS\ 目录里:
extension_dir="E:\PHP\ext" ,指向php文件夹下放置“php_*.dll”文件的路径。
doc_root="E:\appach2.2\php" ,apache设置的首页位置;
default_charset="gb2312" ,修改默认字符集,这里,如果前面有分号“;”,去掉这个分号;
register_globals=Off 改为 register_globals=On ,使传递全局变量有效;
extension=php_gd2.dll如果前面有分号,取消分号,以下同;
extension=php_mbstring.dll
extension=php_myslqi.dll
extension=php_mysql.dll 用于连接MYSQL数据库;
3)、将PHP目录下的 php5ts.dll 文件拷贝到 C:\WINDOWS\system32 目录。
4)、最后修改 Apache 的 httpd.conf 文件。在该文件的末尾添加如下2行,表示以模块方式安装PHP进入Apache:
LoadModule php5_module E:/PHP/php5apache2_2.dll
AddType application/x-httpd-php .php
最后在环境变量里编辑Path,加上";E:\PHP;E:\PHP\ext"
增加系统环境变量PHPRC,变量为"E:\PHP"
新建文件index.php,写上如下代码:
phpinfo();
?>
在浏览器地址栏里输入 http://127.0.0.1/
或 http://localhost/
,你就会看到php版本信息了。

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

AI Hentai Generator
Generate AI Hentai for free.

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 and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

When the Apache 80 port is occupied, the solution is as follows: find out the process that occupies the port and close it. Check the firewall settings to make sure Apache is not blocked. If the above method does not work, please reconfigure Apache to use a different port. Restart the Apache service.

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

PHP makes it easy to create interactive web content. 1) Dynamically generate content by embedding HTML and display it in real time based on user input or database data. 2) Process form submission and generate dynamic output to ensure that htmlspecialchars is used to prevent XSS. 3) Use MySQL to create a user registration system, and use password_hash and preprocessing statements to enhance security. Mastering these techniques will improve the efficiency of web development.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.
