Create PHP test page ZT

Source: Internet
Author: User
Create PHP test page ZT to test whether PHP settings are correct, the following process describes how to create and run a Web page that calls phpinfo. Phpinfo () is a PHP function that generates a system setting information page. The output shows whether PHP works properly.

For information on installing PHP, see http://us2.php.net/install.

Create a PHP information test page


Create a file named info. php in the root directory of the Web content.

If you are not sure which directory to use, check the Web server configuration file. In the Apache installation directory, the content directory is usually named htdocs. If Mac OS X is used, the directory name of the Web content may depend on the account used:


If you are a system administrator on Mac OS X, use/Library/WebServer/Documents.


If you are a Mac OS X user, put the file in/Users/[your username]/Sites.


Insert the following code into this file:

 

Alternatively, once PHP is correctly installed and configured, you can run the following command at the command prompt to create a test Web page.

php -i > info.html

This confirms whether the installed PHP and Apache work properly together.


Test whether PHP and Apache can work normally with Adaptive Server Anywhere:


Copy the connect. php file from the PHP sample directory to the root directory of the Web content.


Access the connect. php page from a Web browser.

Message displayed
Connection successful
.


Create a query page using the SQLAnywhere PHP module


In the root directory of the Web content, create a file named asa_test.php that contains the following PHP code:


Insert the following PHP code into this file:

 

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.