PHP, the endon of the 21st century (4)

zhaozj2021-02-16  49

Translator Note: Recently, I have done my own personal homepage. I hope that all users have to pay, not very grateful! Www22.brinkster.com/cymanhome/index.asp

6. Brief history of php

PHP was originally a simple and compact CGI tool written by Perl, known as "Personal Home Page Tools", and later renamed "Personal Home Page Construction Kit".

It is also called "Professional Home Pages", and now the latest name is "PHP Hypertext Pre-Processor".

There is also a tool that can be very simple to embed the SQL query statement into the web page. This tool can basically be regarded as parsing SQL query statements and is very easy to create another CGI tool for forms and tables. This tool is called Fi (Form Interpreter, form interpreter).

PHP / Fi2.0 completely rewritten these two packs and merged into a separate program. Finally develop into a simple program language embedded in the HTML file. PHP puts a simple script directly in the HTML file so that you no longer need to create a large number of mini PERL CGI programs. Because there is a lot of calls to the Perl program, it greatly improves your overall performance of your web page. It greatly improves the overall performance of your web page. Moreover, by placing all components constituting the web page in a separate HTML file, the management of large sites is easier. Due to the support of various databases, it is very easy to develop a database-based web page. Many people think that this approach is simpler than the created HTML and CGI files.

Now, PHP / FI is again renamed PHP.

7. A simple example

Suppose you have such a form:

Your Display.html file can display the content submitted by the form: ";?>>

This is so easy! PHP automatically creates a variable for each form input field. You can use these variables directly in the file points to the Action.

Once you figure out the method of use, you can write some logical processes in the next step. For example, you want to display different messages according to different user inputs, you can use the IF / ELSE statement. Change the above example, we can do different display according to the age you entered:

50); Echo "Hi $ Name, You are ancient!

"; Elseif ($ AGE> 30); Echo "Hi $ Name, You are Very Old!

"; ELSE Echo "Hi $ Name."; Endif;?>

PHP provides a very powerful scripting language that can do more than the simple example of the above. See the PHP scripting language section for more information. You can also use PHP to configure the access permission of the page. This is implemented by a built-in configuration interface. For example, you can specify users from specific domains to access your page. Alternatively, you can also create a rule that protects a specific page with a password. See the Access Control section for details.

PHP also uploads files from any RFC-1867-compatible web browser. This feature allows users to upload text and binary files. With the PHP access control and logic functions, you can implement complete control with any one who can upload files and file uploads. See the file upload section for details.

PHP has a support package for the PostgreSQL database. It supports embedding SQL query statements in an HTML file.

8. SOAPX4 and PHPXMLPSOAP are XML-based protocols for transmitting messages between two processes and communications for RPC. The XML protocol (XP) working group of the World Wide Web Alliance is developing SOAP standards, which will be called XP.

SOAPX4 (Simple Object Access Protocol, Simple Object Access Protocol) is a PHP implementation: http://dietrich.ganx4.com/soapx4. And http://sourceforge.net/projects/phpxmlp.

8.1 XML / XSLT Publishing Engine KrySalis is a set of XML / XSLT publishing engines based on PHP technology, with design ideas from Cocoon. Interakt has developed Krysalis to achieve the function of the next generation of Web services, that is, information, application logic, and complete separation of the layer.

Krysalis is an open source of XML / XSLT-based PHP development platform, which uses most code of Phakt, created a Krysalis tag library (Taglib).

Its main features are: • Dynamic XML support. · Dynamically generate PDF documents. · Describe the site map with a regular expression. • PXP page cache. · Multiple conversion pipes. • For multiple connection types (ADODB) for different data.

Please visit the Krysalis site for more information http://www.interakt.ro/products/krysalis

9.php library

PHP is an object-oriented scripting language. Therefore, PHP code is "class, class, class, or class". When you write a PHP code, you must write reusable classes that can also use existing classes. There is a large number of written classes on the Internet, which can be used. This is useful to access the class of the database, generate the class of the XML document and the HTML form, and use to create a class and other HTML objects. If you have written a generic class, then please put it online. By 2005, there will be more than 100 million reusable PHP classes. The advantage of the PHP class is to provide functions and features such as data hiding, inheritance, packaging, reliability, reusability, and polymorphism. The most important PHP site is given below:

9.1 PHP class and PHP extensions and application libraries

Access to the following Web site to get a large number of PHP class libraries that can be used

· PHP CLASSES: http://phpclasses.upperdesign.com.

· PEAR (PHP extension and application library) is a PHP extension code library, similar to Perl's CPAN: http://pear.php.net

· AdoDB (Active Data Objects Data Base, Dynamic Data Object Database) http://php.weblogs.com/adoDB: PHP database access function is not uniform. Each database extension uses different and incompatible API functions. This needs to create a database class to hide the differences between different databases (ie, package differentiated between different databases). Thus, we can easily switch between the database. AdoDB is currently supporting mysql, postgreSQL, Interbase, Oracle, MS SQL 7, FoxPro, Access, ADO, Sybase, and general ODBC. Refer to AdoDB's manual. PHPLENS is based on ADODB. · Metabase (Database Separate Access and Management) http://phpclasses.upperDesign.com/browse.html/package/20

· PHP Hot Scripts: http://www.hotscripts.com/php

· Very popular PHP resource site: http://php.resourceIndex.com

· PHP project site: http://php.net/projects.php

· PHP LIB NETUSE: http://phplib.netuse.de

· PHP gadget: http://www.northern.ca/projects/phpwidgets

· PHP4 general frame: http://sourceforge.net/projects/gpfr · source forge PHP library: http://phplib.sourceforge.net · source forge PHP program segment: http://sourceforge.net/snippet

· E-Gineer PHP library http://e-gineer.com/articles/php-hacker

· PHP FAQ: http://php.faqts.com

· PHP library http://px.sklar.com

· PHP factory: http://alfalinux.sourceforge.net/phpfact.php3

· PHP builder: http://phpbuilder.com/snippet

· PHP west: http://www.phpdeveloper.org

· PHP newbie: http://www.newbienetwork.net

· PHP WALRUS: http://www.evilwalrus.com

9.2 Other PHP Tools

Other PHP tools are:

· User login sample: http://www.devshed.com/server_side/php/commerce1

• phppdftable is a PHP class that is convenient for the creation of the PDF report. You need to install php4.x (php3.x should also be) and pdflib: http://sourceforge.net/projects/phppdftable

· The data administrator provides a PHP-based data management interface. It is not limited to one or two databases. And encapsulate the original PHP database access function: http://sourceforge.net/projects/dadmin

• PSLIB is a class library for generating a PostScript file. A simple way to generate a PostScript file is provided. Simply call the PSLIB function in your PHP script to generate a PS file: http://sourceforge.net/projects/pslib

· A set of complete PHP scripts that can be collaborate, create a highly custom, dynamic, and module-oriented Web site: http://sourceforge.net/projects/twebs · phPopentracker is a comprehensive solution for a site access tracking . The collected data is stored in the SQL database. It can be complex but simple analysis work. A set of powerful APIs for analyzing and generating reports (HTML and PDF) is: http: //www.phpopentracker.de .Phpshopcart is a online shopping cart program written in PHP, using the MySQL database. This program is written for "Database Guide under Linux": http://sourceforge.net/projects/phpshopcart

10 PHPGEM packs PHPGEM itself is also a PHP scripker that accelerates the PHP script that generates an operational data table. It is possible to work in different SQL databases such as PostgreSQL, MySQL, MSQL, ODBC, and Adabas. You only need to enter the description information and parameters of the data field (such as the field name, Yes / No Search field, etc.), PHPGEM will output another PHP script for you, which can perform various operations on this data table (browse / add / Edit / Delete / Replication / Search. PHPGEM supports multi-layer nested data sheets. PHPGEM allows you to specify a level of access to each data table and field for each user. PHPGEM also supports image information. (Endlessly)

转载请注明原文地址:https://www.9cbs.com/read-27952.html

New Post(0)