Home >Backend Development >PHP Tutorial >How to open php file_PHP tutorial

How to open php file_PHP tutorial

WBOY
WBOYOriginal
2016-07-15 13:22:31916browse

 What is php:

 PHP is the abbreviation of the English hypertext preprocessing language Hypertext Preprocessor. PHP is an HTML embedded language. It is a scripting language that is embedded in HTML documents and is executed on the server side. The style of the language is similar to C language and is widely used.

PHP is what everyone often calls the backend on the Internet. It is used to process databases, etc. Many websites are written in PHP, including www.baidu.com, www.jb51.net and other websites, all of which use PHP. language written. Our articles are uploaded to the server database through PHP code, and then statically generated through PHP code.

 How to open a php file:

In a simple sentence, php is the same as a txt (text document). Notepad can open it, but what you see is the code, not the code. The effect after php is executed. For example, when we open the test.php code because the encoding is in gbk or utf8 format, when using notepad to open the php file in utf8 format, garbled characters appear when there are Chinese characters, so we recommend using dreameweaver or editplus Wait for software that supports utf8 format files to open it. (Ordinary users can choose editplus to open it, because editplus is relatively small)

 A piece of php test code

Copy the code as follows:

 

 for($i=1;$i<=10;$i++){

 echo $i.'
';

 }

echo "www.jb51.net";

?>

But people often do not want to see such code, if they want to see the effect after execution , you need to configure the php running environment.

The www.jb51.net you visit is a pre-configured PHP operating environment on the server side. It may be Linux or Windows. When purchasing space, please ask the IDC provider whether they support PHP. , otherwise if you purchase a space that does not support PHP in the future, it will not be able to support PHP.

If you are testing the php code locally, you can use some tools such as phpnow (phpnow is relatively simple to install and use. After installation, copy the php file to the htdocs directory and enter http://127.0 in the browser .0.1 is enough. If you select a port, you need to add the port http://127.0.0.1: port number). IIS can also be used, but it requires a slightly more professional person to configure it. Here we also provide you with the iis php operating environment. The premise is that your computer has iis, which is generally not installed on personal computers by default. The operating systems that support iis are generally winxp and win2003 systems.

If you have set up the PHP operating environment and enter the URL in the browser, you can see the running effect of PHP (Note: the URL you enter in the browser may be different, ours is the intranet IP )

Many friends who have no foundation often ask how to open PHP files. In fact, PHP is a web script, but it is different from the HTML xml tag language. It can be opened directly through the browser and requires a PHP running environment. To access and open files, if you only need to edit PHP to open the file, you only need to use Notepad or a related editor such as (DW, EclipsePHP, editplus, etc.) to open and edit it.

Let’s introduce what PHP is and add some basic knowledge of PHP. PHP is the abbreviation of the English hypertext preprocessing language Hypertext Preprocessor. PHP is an HTML embedded language. It is a scripting language that is embedded in HTML documents and is executed on the server side. The style of the language is similar to C language and is widely used. Another meaning of PHP is: The standard symbol for the Philippine peso.

When we were learning website construction, the language we came into contact with most in the early stage was definitely HTML, and the dynamic language was definitely ASP. However, with the development of the network and the change in the direction of hosts, especially overseas hosts have more LINUX systems, while WIN systems are rare and very expensive. Therefore, we are forced to choose LINUX host and use PHP language program. Some friends asked how to open a website in PHP language. This problem is actually very simple. No matter what language the web page is in, we can open it with DW or EDITPLUS or Notepad.

But debugging PHP programs is not as simple as ASP. We can debug directly in the PHP space or install the local environment. The PHPNOW or WAMPSERVER I am using now are both good tools.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446960.htmlTechArticleWhat is php: PHP is the abbreviation of the English hypertext preprocessing language Hypertext Preprocessor. PHP is an HTML embedded language, which is an embedded HTML document executed on the server side...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn