Instance parsing: migrate from ASP in IIS to PHP in APACHE

Source: Internet
Author: User
Tags apache php website server
Currently, in the website server software market, open-source Apache servers account for 60% of the market share, while Microsoft ranks second among the free-bound IIS servers in the operating system, with a market share of 31%, in general, the current website server software market has been divided by Apache and IIS. ApacheIIS

Currently, in the website server software market, open-source Apache servers account for 60% of the market share, while Microsoft ranks second among the free-bound IIS servers in the operating system, with a market share of 31%, in general, the current website server software market has been divided by Apache and IIS.

Generally, the performance of Apache is better than that of IIS. Although the IIS operation management interface is very easy to use, it is still the trend of the times to migrate from IIS platform to Apache platform, today, I will introduce several methods for converting IIS ASP to Apache PHP.

Simulate ASP running through plug-ins

Some company products allow iis asp code to run normally in the Apache environment. Currently, the main products include:

Apache: ASP http://www.apache-asp.org/

Convert ASP to PHP through a program

ASP and PHP are both easy-to-use web scripting languages. Currently, some third-party programs can convert ASP to PHP, such as asp2php for free.

Asp2php is a conversion program that converts ASP to PHP. Similar conversion programs include Chilisoft, InstantASP, and Free ASP. Currently, asp2php can convert most ASP Programs. However, there are some bugs in the conversion process, you need to manually adjust the source code.

Use Windows to call COM

If you are using a Windows + Apache environment, the database can still use Access or SQL Server database. after using PHP to create the COM component of ADODB, you can directly use its command, the calling method is exactly the same as that in ASP. the sample code is as follows:

Reference content is as follows:

Reference content is as follows:

$ Conn = new com ("adodb. connection ");

$ Conn-> open ("driver = microsoft access driver (*. mdb); dbq = member. mdb ");

$ Rs = $ conn-> execute ("select * from tablename ");

While (! $ Rs-> eof ){

$ F = $ rs-> Fields ("username ");

Echo $ f-> value;

$ Rs-> MoveNext ();

}

$ Rs-> close ();

$ Conn-> execute ("update tablename set username = 'William long '");

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.