Create PHP test Page ZT

Source: Internet
Author: User
To test whether PHP is set up correctly, the following procedure describes how to create and run a Web page that calls Phpinfo (). Phpinfo () is a PHP function that generates a system settings information page. The output will show whether PHP is working 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 your Web content.

If you are not sure which directory to use, check the WEB server's configuration file. In the Apache installation directory, the content directory is typically named Htdocs. If you are using a directory name for Mac OS x,web content, it may depend on the account you are using:


If you are a system administrator on a MAC OS X system, use/library/webserver/documents.


If you are a Mac OS X user, place the file in/users/[your username]/sites/.


Insert the following code into this file:

 
  

Or, once PHP is installed and configured correctly, you can also create a test Web page by executing the following command at a command prompt.

Php-i > info.html

This confirms that the installed PHP and Apache will work together properly.


Test to see if PHP and Apache work together 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.

The message should now be displayed
Connection Successful


Create a query page that uses the Sqlanywhere PHP module


Under 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:

 
  
  • Related Article

    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.