How to open php file How to execute php file
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 embedded in HTML documents that is executed on the server side. The language style is similar to C language and is widely used.
php is what everyone often calls the backend on the Internet, used to process databases, etc. Many websites are written in php, including www.baidu.com, www.jb51.net and other websites, which are all written in php language. . Our articles are uploaded to the server database through PHP code, and then statically generated through PHP code.
How to open 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, not the effect of php execution. For example, when we open the test.php code, 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. Therefore, we recommend using Dreameweaver or Editplus that supports utf8 format files. The software opens. (Ordinary users can choose editplus to open it, because editplus is relatively small)
A piece of php test code
<?php for($i=1;$i<=10;$i++){ echo $i.'<br />'; } echo "www.php.cn"; ?>
But everyone’s purpose is often not to see such code. If you want to see the execution of As a result, you need to configure the PHP operating environment.
The www.php.cn you visit is a PHP running environment configured in advance on the server side. It may be Linux or Windows. When purchasing space, please 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 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 unlike the HTML xml tag language, it can be opened directly through the browser. A PHP running environment is required to access and open it. File, 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 must be HTML, and the dynamic language must be 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.
For more articles on how to open php files and how to execute php files, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Alipay PHP...

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
