How to open the php file and execute the php file _ php entry _ script house

Source: Internet
Author: User
Tags what php
Recently, many of our friends asked us what php is and how to open the php file. Below are some documents edited by students.

Recently, many of our friends asked us what php is and how to open the php file. Below are some documents edited by students.

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 www.baidu.com and www.jb51.net, 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 or other software that supports utf8 files. (Select editplus for normal users, because editplus is relatively small)

Php testing code
The Code is as follows:
For ($ I = 1; $ I <= 10; $ I ++ ){
Echo $ I .'
';
}
Echo "www.jb51.net ";
?>

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.
Www.jb51.net 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 is easy to install and use. After installation, copy the php file to the htdocs directory and enter http in the browser: // 127.0.0.1. If you select a port, you can add the port http: // 127.0.0.1: Port Number) to iis. However, you must be a professional user. Here we will also provide you with some information. 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 the PHP program is different from ASP. We can directly debug or install the local environment in the PHP space. The PHPNOW or 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: 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.