Why can't php be run directly?

青灯夜游
Release: 2023-04-06 15:52:02
Original
7901 people have browsed it

php cannot be run directly because php is a general open source scripting language, a programming language that cannot be directly recognized by the browser, so the PHP file must be parsed by the server before it can be browsed on the browser. If this A machine cannot run without a running environment.

Why can't php be run directly?

Why can’t php be run directly?

Because Php is a general open source scripting language and a programming language; it cannot be directly recognized by the browser, and the PHP file must be parsed by the server (for example: Apache) before it can be browsed on the browser. If the machine does not have a running environment, it cannot run.

If you directly right-click the file and open it with a browser, it will not be parsed by Apache, which is equivalent to directly opening a local PHP file with a browser. The browser cannot directly recognize it and will prompt you to download the file. , or other questions. For details, please refer to: What is PHP, this article!

The above is the detailed content of Why can't php be run directly?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template