3.2 Quickly install Apache Web server on Windows 95/98/NT/2000 (10 seconds) To run PHP on Windows, you need a Web server. You can use Microsoft's IIS or free Apache. Because it can be installed through Apache's installation file setup.exe, it can save you a lot of time. PHPTtriad is a software package including Apache, PHP, and MySQL. It can be downloaded from http://www.phpgeek.com/phptriad.php or its mirror site http://sourceforge.net/projects/phptriad. I highly recommend using PHPTtriad, which is extremely popular among Windows users (has been downloaded millions of times). Apache binaries: http://httpd.apache.org/dist/httpd/binaries/win32 3.3 Microsoft SQL Server SQL Server can be installed on a machine that does not need to run Windows, and you also need a SQL server for web development . I recommend you install Redhat Linux and PostgreSQL RPMs on a very old PC (such as a Pentium or 486). Your database does not require any Windows graphical interface, you can start PostgreSQL directly from the console. PostgreSQL is about 3 times faster than Oracle and MS SQL server. PHP's PostgreSQL support library is written by Adam Sussman, his email address is: asussman@vidya.com Support for Windows NT/2000 PostgreSQL can be downloaded from http://www.askesis.nl. The PostgreSQL usage guide is available at http://www.geocities.com/alavoor/HOWTO/pgsql/PostgreSQL-HOWTO.html. 3.4 Installation of PHP on UNIX and other operating systems. Please refer to the installation guide and instructions on the PHP main site www.php.net, or the INSTALL file in the downloaded software package. 4. Quickly advance to use PHP's object-oriented mechanism to implement a project. The steps are as follows: ·First, you need to connect to a database SQL server - there are two options: ADODB (Active Data Objects Data Base), which is a dynamic data object database (http://php.weblogs.com/adodb) Metabase (Database independent access and management), that is, database independent access and management (http://phpclasses.upperdesign.com/browse.htm/package/20) ·Second , you need some common PHP classes to create forms, tables, and other HTML objects. These are available from the PHP classes website (http://phpclasses.upperdesign.com). You can refer to the download ranking list of this website. You can also obtain form classes, template classes, etc. from the website http://www.milkywaygalaxy.freeservers.com/. ·Third, design and create your own PHP classes by inheriting these common classes. ·Fourth, use template classes to separate display styles and business logic, see http://www.phpclasses.com ·Fifth, use IDE tools for development (see the PHP IDE section). ·Finally, it is best to encapsulate your code into classes, so that the code can be maintained and reusable. 5. Main features of PHP ·Supports standard CGI, FastCGI and Apache modules - As a standard CGI program, PHP can be installed on any UNIX machine running any Web server. PHP supports the new FastCGI standard. Through this mechanism, PHP has gained speed improvements. When configured as an Apache module, PHP becomes an extremely powerful, lightning-fast new choice. ·Access log - Through PHP's log access function, users can maintain their clicks and logs. This feature provides real-time access monitoring without using the system's central access log files in any way. The log browsing script provides a quick summary of visits to a set of pages owned by an individual user. In addition, the package can be configured to generate a footer for each page to display access information. Please refer to the examples at the end of the article. ·Access Control - A built-in web-based configuration "screen" that enables access control configuration. In this way, it is possible to create a set of rules for all or part of the web pages, so that a specific person who owns these pages can set various restrictions on his web pages, such as who can access these pages and in what way these pages can be accessed. method is accessed. There are many ways to configure the page, such as password protection, full restriction, login invalidation, or more based on the customer's domain, browser, e-mail address or even other documents involved. · Support for PostgresSQL - PostgresSQL is an advanced but free RDBMS (relational database management system). PHP supports embedding PostgresSQL's "SQL query statement" directly in the .html file.·Support RFC-1867 file upload - file upload is a new feature of Netscape2.0. Users can upload files to the web server. PHP provides actual MIME decoding functionality, making file uploading possible. PHP also provides additional frameworks that perform some useful processing on received uploaded files. HTTP-based authentication controls - PHP can be used to create custom HTTP-based authentication mechanisms for the Apache server. ·Variables, arrays, associative arrays - PHP supports typed (I don’t know how to translate this word, I hope an expert can guide me) variables, arrays, and even Perl-style associative arrays. And these can be passed from one page to another through the GET or POST method of the form. ·Conditional statements, While loops - PHP is a fully functional scripting language similar to C language. You can use if/then/elseif/else/endif conditional statements, as well as While loops and Switch/case statements to arrange the logical flow of HTML page display. ·Extended regular expressions - Regular expressions are frequently used for pattern matching, pattern substitution, and general string manipulation. PHP supports all common regular expression operations. ·Original HTTP Header control - Allowing Web pages to send customized original HTTP headers according to certain conditions is very necessary for some advanced website designs. A common usage is to send a Location: URL header to redirect the client's request to another URL. It can also be used to turn off caching or manipulate the latest updated HTTP headers of the page. ·Dynamic creation of GIF images - PHP already supports Thomas Boutell's GD image library, which can realize the dynamic creation of GIF images. ·Support ISP "safety mode" - PHP supports a unique "safety mode", making it safer for multiple users to run PHP scripts on the same server. ·Many new features have been added to the newly released PHP. The main PHP site can be accessed at http://www.php.net. ·PHP is free! ——This is the last important feature. PHP packages are completely free. It complies with GNU/GPL. You can use this software for business or any other purposes. 5.1 Advantages of PHP over Java PHP is an established server-side scripting language for creating dynamic web pages. As a language specifically designed for the Web, PHP brings many features that business organizations crave. ·Extremely short learning cycle ·Fast development time ·Very high performance This is of great significance for companies that lack skilled programmers and are very pressed for time. PHP runs on all major operating platforms (UNIX, Windows, and even mainframes) and has native support for a variety of popular databases. All this determines that it is an ideal choice for web development: some online stores that used PHP technology said that they only needed to hire amateur programmers and be able to develop reusable code within a few days. Programmers who are familiar with languages such as C, C++, or Java often find that they can program PHP within a few hours. The fact that PHP was designed for Web development makes it a unique development tool, as Intranet Design magazine commented: "PHP is built on the real needs of Web developers.... Unlike other clunky, high-load methods, PHP is very lightweight and tailor-made for web development. It can solve complex problems faster and easier than other similar technologies. "Java as a new programming language. , originally used to run client applications embedded in browsers. In the past few years, problems exposed by "applets" have forced Sun and other Java developers to find new solutions for the language. The most prominent of these is server-side programming, which allows Web sites to connect to databases and generate other server-side applications, known as "servlets."SUN eventually introduced Java Server Pages (JSP) as a means of writing servlets. Like PHP, JSP is highly portable across different platforms (although PHP supports any 32-bit and above platforms, JSP can only run on platforms with a Java Virtual Machine installed). However, a newbie with no programming background will find that programming with servlets is extremely difficult due to the complexity of the language and the complex way that JSP systems are designed. JSP's performance also leaves much to be desired: A recent survey by eWeek, ZDnet's online publication, found that PHP runs almost 3.7 times faster than JSP. It can be said that JSP is a very poor solution in the Web environment because it can only handle very few transactions per second and the response speed is quite slow. ZDnet's eWeek magazine also mentioned: "JSP is a relatively new technology. In terms of development tools, resources, and talents, it has not yet reached full market maturity."... Since JSP is based on Java, and Java is a strongly typed language, so we have to declare the types of variables and manually convert types where needed. This makes JSP one of the most difficult scripting languages for amateur programmers to learn. PHP and Java working together It is important to realize that JSP is just a language that can access Java objects. PHP can also integrate Java, which means that, like JSP, PHP can become a scripting language that can call Java logic. But unlike JSP, PHP can also call other component models, such as Microsoft's COM, and it is extremely easy to add support for new object models. It can be seen that PHP's expansion capabilities are endless. JSP, on the other hand, is completely dependent on Java. IBM programmer Sam Ruby uses PHP and Java together. Through PHP's good support for Java, Java objects can be created and used transparently like regular PHP objects. AutotionWatch enables business groups of all sizes to benefit from its dynamic bidding environment. It has more than 2.6 million visitors per month; it has more than 300,000 registered users; and it conducts 1.2 million auctions every month. They tried using Java, but chose PHP because it was easier to use and faster to develop. For more information, please contact Ben Margolin, Director of AuctionWatch Sales Services (ben@auctionwatch.com). Programming consultant Reuven Lerner has made comparisons between various languages. His views on PHP are summarized as follows: "It is an easy language to learn. Artists and web designers may say that they are not programmers, but in fact, they are increasingly using JavaScript, VBScript in large projects And some other simple programming languages. Compared to Perl, PHP is more formal and clear; it is easier for a newbie to master than Java. Indeed, PHP is a bit like JavaScript (if there is a server-side version). Regardless of whether you have programming experience or not, you can learn and use PHP in a short time. This may be possible with VBScript, but certainly not with Perl and Java... PHP is definitely an extraordinary and powerful system. It seems that it can become a popular language for creating Web sites... I think that PHP will become a strong competitor to Java and JSP, and I will highly recommend PHP for some clients and internal company projects." PHP: Always moving forward. JSP has Sun as its backing, so it continues to gain media attention. But what's interesting is that despite no publicity campaign, PHP's popularity is still growing at a rate of 8-11%, which is much greater than the 4% monthly growth rate of server-side applications. Six and a half million sites use PHP (see Net