search
HomeBackend DevelopmentPHP TutorialWhat is PHP? How to open PHP files?
What is PHP? How to open PHP files?Jul 23, 2018 pm 05:24 PM
php file

What is php? PHP is an HTML embedded language, a scripting language that is embedded in HTML documents and executed on the server side. So, how to open a PHP file? Let's take a look at how to open the

php file:

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

A piece of php test code, the code is as follows:

 <?php  
for($i=1;$i<=10;$i++){  
echo $i.&#39; 
&#39;;  
}  
echo "www.php.cn";  
?>

But everyone’s purpose is often not to see such code. If you want to see the effect after execution, you need to configure the PHP running environment.

The www.php.cn you visit is a pre-configured PHP operating environment on the server side. It may be Linux or Windows. When purchasing space, ask the IDC provider if 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 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 html xml Tag language can be opened directly through the browser. You need a PHP running environment to access and open the file. If you only edit PHP to open the file, you only need to use Notepad or related editors such as (DW, EclipsePHP, editplus etc.) and just open it for editing.

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 is a scripting language embedded in HTML documents that 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 of the Philippine Peso.

When we were learning website construction, the language we came into contact with most at the beginning 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.

Related recommendations:

How to open a PHP file?

How to open a PHP file, how to open a PHP file?

The above is the detailed content of What is PHP? How to open PHP files?. For more information, please follow other related articles on the PHP Chinese website!

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
php文件如何在手机上打开php文件如何在手机上打开Nov 13, 2023 am 11:08 AM

要在手机上打开php文件,需要在手机上搭建一个能够运行php的服务器环境,并将php文件上传到服务器上。然后,在手机上的浏览器中输入服务器的IP地址或域名,加上php文件的路径,即可打开php文件并查看其内容。

如何处理PHP文件路径大小写错误并生成相应的报错信息如何处理PHP文件路径大小写错误并生成相应的报错信息Aug 08, 2023 pm 09:45 PM

如何处理PHP文件路径大小写错误并生成相应的报错信息在开发PHP程序的过程中,我们经常会遇到文件路径大小写错误的问题。由于Windows和Linux系统对文件路径的大小写处理方式不同,当程序在开发环境中使用Windows系统测试通过后,在部署到Linux服务器上时可能会导致路径错误。为了解决这个问题,我们可以通过一些方法来处理文件路径的大

如何才能打开php文件如何才能打开php文件Sep 01, 2023 am 11:53 AM

打开php文件步骤:1、选择文本编辑器;2、在选择的文本编辑器中,创建一个新的文件,并将其保存为.php文件;3、在创建的PHP文件中,编写PHP代码;4、要在本地计算机上运行PHP文件,需要设置一个服务器环境;5、安装服务器环境后,需要将PHP文件放入服务器目录中;6、一旦将PHP文件放入服务器目录中,就可以通过浏览器来运行它。

.php文件中可包含几方面内容.php文件中可包含几方面内容Mar 06, 2023 pm 05:32 PM

php文件中可包含的内容:1、起始标签“<?php”和结束标签“?>”,所有PHP代码都必须写在这对标签的里面;2、分号“;”,是PHP语句的分隔符,也代表着代码执行的指令;3、注释,有单行注释“//”、多行注释“/* */”、Shell注释“#”三种风格注释;4、换行符,可加强代码的可读性;5、代码段(如函数等)。

怎么打开php文件怎么打开php文件Jan 24, 2024 pm 04:12 PM

打开php文件的工具:1、Notepad++;2、Sublime Text;3、Visual Studio Code;4、Eclipse;5、XAMPP。详细介绍:1、Notepad++,这是一个免费的文本编辑器,支持多种编程语言,包括PHP,它具有语法高亮和代码折叠等功能,可以更轻松地阅读和编辑PHP代码;2、Sublime Text,这是一款功能强大的文本编辑器等等。

运行PHP程序的前提条件是什么?运行PHP程序的前提条件是什么?Mar 26, 2024 pm 03:45 PM

标题:运行PHP程序的前提条件及示例PHP是一种广泛应用于Web开发的脚本语言,许多网站都是通过PHP来运行其动态内容。要成功运行PHP程序,必须满足一些前提条件。下面将介绍运行PHP程序的前提条件,并提供具体的代码示例。服务器环境首先,PHP程序需要在支持PHP语言的服务器环境中才能正常运行。最常见的服务器环境是Apache服务器,并且需要安装PHP解释器

PHP文件可包含哪些代码PHP文件可包含哪些代码Aug 01, 2023 pm 01:34 PM

PHP文件可包含的代码:1、PHP代码,用来完成各种服务器端的任务;2、HTML代码,用来定义网页的结构和布局;3、CSS代码,用来定义网页的样式;4、JavaScript代码,用来实现在网页中进行各种动态交互的功能;5、SQL代码,用来操作数据库;6、文件包含代码,可以将代码进行模块化;7、第三方库和框架,可以快速构建功能丰富的应用程序。

如何处理PHP文件编码错误并生成相应的报错信息如何处理PHP文件编码错误并生成相应的报错信息Aug 06, 2023 pm 02:09 PM

如何处理PHP文件编码错误并生成相应的报错信息在开发PHP应用程序时,经常会遇到文件编码错误的问题。这些错误可能会导致程序无法正常运行,或者在用户面前展示乱码。为了更好地处理这些错误并生成相应的报错信息,我们可以采取一些常见的解决方案。确定文件编码首先,我们需要确定文件的编码格式。常见的编码格式有UTF-8、GBK等。可以通过文本编辑器的“另存为”功能来查看

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor