How to open a PHP File

Source: Internet
Author: User
Tags php website what php

What is php:

PHP is short for Hypertext Preprocessor. PHP is an embedded HTML language. It is a scripting language that executes HTML documents embedded on the server. It is widely used in a style similar to C language.
Php is the background commonly used in the network. It is used to process databases. Many websites are written in php, including and, which are all written in php. All of our articles are uploaded to the server database through php code, and then generate static data through php code.

How to open the PHP file:

In a simple sentence, php is the same as txt (Text Document). You can open it in notepad, but you can see the code instead of the php Execution result. For example, we can open test. php code is encoded in gbk or utf8 format. When you use NotePad to open a php file in utf8 format, garbled characters occur when there is a Chinese character, therefore, we recommend that you use software such as dreameweaver or editplus that supports utf8 files. (Select editplus for normal users, because editplus is relatively small)

Php testing codeCopy codeThe Code is as follows: <? Php
For ($ I = 1; $ I <= 10; $ I ++ ){
Echo $ I. '<br/> ';
Echo " ";

However, you often do not want to see such code. If you want to see the execution result, you need to configure the php runtime environment. is a php runtime environment configured on the server side. It may be linux or windows. When purchasing a space, you can ask the idc vendors to check whether they support php, otherwise, I purchased a space that does not support php and cannot support php.

If you are testing php code locally, you can use some tools such as phpnow (phpnow is easy to install and use. After installation, copy the php file to the htdocs directory and enter http in the browser: // If you select a port, you can add the port http: // Port Number) to iis. However, you must be a professional user. Here we also provide you with the iis php runtime environment. The premise is that you have iis on your computer. By default, it is not installed on your PC. The OS that supports iis is generally winxp or win2003.

If you have set up the php runtime environment and enter the web site in the browser, you can see the Running Effect of php (Note: The Web site entered in the browser may be different. We use an intranet ip address)
As shown in:

Many friends without a foundation often ask how to open the PHP file. In fact, PHP is a Web page script, but unlike the html xml tag language, it can be opened directly through a browser, you must have a PHP runtime environment to access and open the file. If you only need to edit PHP to open the file, you only need to use notepad or use relevant editors such as DW, EclipsePHP, and editplus) click Edit.

Next we will introduce what PHP is and add some basic PHP knowledge. PHP is short for Hypertext Preprocessor. PHP is an embedded HTML language. It is a scripting language that executes HTML documents embedded on the server. It is widely used in a style similar to C language. Another meaning of PHP is the standard symbol of the Philippine peso.

When we were learning about website construction, most of our initial contacts must be the HTML language, and the dynamic language must be ASP. However, with the development of the network and the change of the host direction, especially the LINUX system, which has a large number of hosts outside China, Windows systems are rare and expensive. Therefore, we are forced to select a LINUX host and use a PHP program. Some friends asked how to open a PHP website. This problem is actually very simple. No matter what language web pages are used, we can open them with DW, EDITPLUS, or notepad.
However, debugging PHP programs is not as simple as ASP. We can directly debug or install the local environment in the PHP space. The PHPNOW or wampserver I am using is a good tool.

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