Php and XML, XSLT, and Mysql joint application, installation

Source: Internet
Author: User
Tags xslt
Users often ask some posts about php, XML, and database joint applications. Also, some beginners often write php code and HTML code together, then, when an error occurs, you cannot find the error and are in a hurry. I will give you a lecture below.

I often see some posts about php, XML, and database joint applications, and some beginners.
The php code and HTML code are mixed together, and the error cannot be found in the case of an error. the error is so anxious that I will give it a big one.
Let's talk about how to separate HTML code and PHP programs with XML skills. of course, there are many different skills, such as PEAR.
IT template.
In general, I personally think that the XML technique is the most convenient, and we have not said much about it,
Let's talk about the installation in win2000.

Some dll libraries are used to apply xml and xslt in php,
Extension = php_domxml.dll // controls the XML function library
Extension = php_iconv.dll // for transcoding, such as converting GB2312 to UTF-8
Extension = php_xslt.dll // Function library of XSLT

When the above three libraries are used, you need to add the dlls directory under the php installation directory to the path; otherwise, the directory cannot be found.
The

In the following course, we will use the PEAR class library in php. it is important to use the DB class library and Sql2XML class library.
Pear.php.net
After downloading the above two class libraries, you 'd better set them in php. ini.
Include_path = '.; d: phppear'

D: phppear is the installation path of my pear.

After the configuration is complete, restart the machine. Otherwise, the Apache startup is abnormal because the path cannot be found, and the application will not work properly.


So far, you have to apply the XML and XSLT settings in PHP. is it very simple :)
Linux users can
Http://www.gingerall.com/download the source code for release t.
Http://www.gnu.org/software/libiconv/download source code for iconv

Php and XML, XSLT, and Mysql
Next I will talk about a simple process of extracting data from a database, a natural XML document, and converting XSLT into HTML,
This process only describes the process of applying this technique, and does not involve paging and other techniques.

In this example, the following database tables and data are used.
Table name: enterprise user information table, English name: yhxx
Table structure:
#
# Data table structure 'hxx'
#

Create table yhxx (
Nsnm varchar (15) not null default '',
Qymc varchar (200) not null default '',
Qydh varchar (50) not null default '',

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.