


Practical configuration and installation of Apache+php under Windows system_PHP tutorial
Bangkejia (www.Bkjia.com) Tutorials There are too many tutorials on installing apache and php under windows. The editor searched the Internet, but none of them were decent, or they were not right. It’s clear, or it cannot be opened. My personal opinion is not to use the package, because you can practice installing it yourself. Below, I will share the method of installing apache+php by myself as follows:
1. Download the Apache2 and php5 installation packages (search on Baidu yourself)
2. Click directly to install Apache2 (it is recommended not to install the C drive to save trouble). The installation steps are not much different from other software installations, so there is no special statement.
You can ignore the port problem for now. After installation, you can change the port number by modifying the Listen in httpd.config.
Bkjia www.bkjia.com
3. Install PHP5:
Unzip the php5 zip package and put it in a directory you find convenient, such as d:/php5.
4. (1) Copy all dll files in the php folder to c:/windows/system32/ (including all dll files in the ext folder in the php5 directory)
(2) Copy the "php.ini-recommended" file to "c:/windows" and rename it to "php.ini".
5. Modify the php.ini file that has just been renamed:
(1) Find the "extension_dir" field and assign the value to the ext directory in the php decompression path, such as "D:php5ext"
(2) Find the cgi.force_redirect string. The default value is 1. Modify it to 0. And cancel the previous; sign
6. Find the following four sentences respectively and remove the “;” before them.
extension=php_mbstring.dll (wide character, used to support PhpMyAdmin to avoid character display problems)
extension=php_mcrypt.dll (used to support PhpMyAdmin)
Extension=php_mysql.dll (MySql module, you can only access the MySql database after opening it)
extension=php_mysqli.dll (MySql module)
7. Configure Apache to support php5:
Open the "conf" folder in the apache installation directory. Apache configuration mainly relies on httpd.conf. Open the file with a compilation tool and modify some fields in it:
(1)Listen field, the default value is 80, you can modify the port value to change the port of the apache service (so as not to conflict with the port of tools such as tomcat)
(2)DocumentRoot This is the directory where your own web page files are placed. The default is the "htdoc" folder under the apache installation directory. It can also be changed to other directories on the local machine, using absolute paths.
I am using: DocumentRoot "D:/phpwork/" (newly created working directory)
8. Set the start page:
You can copy my configuration here, or you can add the required start page file name yourself. Note that file names are separated by spaces instead of commas
DirectoryIndex index.php index.html default.php default.html index.htm
9. Configure the php module: add two sentences after #LoadModule (there is a row of code) (this is my installation directory, you can make appropriate adjustments according to your own installation situation)
PHPIniDir "D:/php5/"
LoadModule php5_module "D:/php5/php5apache2_2.dll"
10. Save the httpd.conf file and restart Apache. If it starts successfully, create a new liehuo_net.php file under phpwork with the content:
以下为引用的内容: echo "Welcome to Liehuo.Net! "; phpinfo(); ?> |
Enter http://localhost/: the port number you set yourself/liehuo_net.php in the browser. Output the Welcome To Liehuo.Net and php configuration environment variable information. The installation is over. If you have any questions, please comment. !

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

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 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.

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.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

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

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


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

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.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver CS6
Visual web development tools