php简介
![](https://i-blog.csdnimg.cn/blog_migrate/2e63b06a1257b57a9399a70942238be3.png)
PHP is a server-side processing language for web pages: that is, it processes code contained with PHP tags, displaying the result in the browser or doing something else with the information (storing it in a database, sending it via eMail, etc). Developed in 1994 by Rasmus Lerdorf, the PHP acronym stood for “Personal Home Page”, later changing to “PHP: Hypertext Processor”, one of the self-referential acronyms that plague the IT industry. Personally, I prefer Pre-Hypertext Processor, to make it clear that PHP runs before anything else on the page.
PHP是网页的服务器端处理语言:也就是说,它处理PHP标记中包含的代码,在浏览器中显示结果或对信息进行其他处理( 将其存储在数据库中 , 通过电子邮件发送等)。 。 PHP的缩写由Rasmus Lerdorf于1994年开发,代表“个人主页”,后来更改为“ PHP:超文本处理器”,这是困扰IT行业的自指缩写。 就个人而言,我更喜欢Pre-Hypertext Processor ,以使PHP可以在页面上的其他任何内容之前运行。
PHP is a server-side language. PHP code on a web page is executed by a server and turned into results for the client (typically a web browser). PHP can generate HTML, CSS, even graphics. The fact that PHP runs on the server means that, so long as it is correctly written, PHP just works: it does not depend on the client’s computer to operate or run correctly, thus avoiding the disadvantages of JavaScript and Flash.
PHP是服务器端语言 。 网页上PHP代码由服务器执行,并转换为客户端(通常是网络浏览器)的结果。 PHP可以生成HTML , CSS甚至图形。 PHP在服务器上运行的事实意味着,只要正确编写PHP,PHP 就可以正常工作 :它不依赖于客户端计算机来正确运行或运行,因此避免了JavaScript和Flash的缺点。
PHP is one the most powerful technologies available to web developers, having six major advantages:
PHP是可供Web开发人员使用的最强大的技术之一,具有六个主要优点:
-
It is free and open source.
它是免费和开源的。
- www.php.net). PHP isn’t proprietary to any one company: it is maintained by collective interest, not for profit. www.php.net )。 PHP并非任何一家公司专有:它是出于集体利益而不是为了利润而维护。 最受欢迎的服务器和数据库解决方案 Apache and Apache和 MySQL, the most popular server and database solutions, are also free and open source. MySQL也是免费和开源的。 It can be interweaved with HTML and CSS. 它可以与HTML和CSS交织在一起。
-
<?php ?>
tag (the opening and closing tags of PHP, respectively) is interpreted as HTML, you can create static elements in HTML and interweave dynamic elements in PHP, all on the same page.<?php ?>
标记(分别为PHP的开始和结束标记)之外的任何内容都被解释为HTML,因此您可以在同一页面上用HTML创建静态元素,并用PHP交织动态元素。
It is cross-platform.
它是跨平台的。
- Because it is interpreted by the server, not the client, PHP is not subject to the vagaries of interpretation by different browsers/platforms, etc. Once PHP runs correctly on a page, it will run the same forever, assuming that the server itself does not change.
- 因为它是由服务器而不是客户端来解释的,所以PHP不受不同浏览器/平台等的解释的影响。一旦PHP在页面上正确运行,它将永久运行,前提是服务器本身在运行不变。 PHP is expressly designed to create dynamic content for web pages. PHP专门设计用于为网页创建动态内容。
- Unlike Perl and other languages, PHP was designed for the web “from the ground up”.
- 与Perl和其他语言不同,PHP是“从头开始”为Web设计的。 The end user never sees PHP code. 最终用户永远看不到PHP代码。
- Unlike HTML and JavaScript, PHP is interpreted into HTML “on the fly” when it is delivered from the server. No visitor can ever see your PHP code.
- 与HTML和JavaScript不同,从服务器交付PHP时,PHP会“即时”解释为HTML。 没有访客能看到您PHP代码。 It is relatively easy to use and learn. 它相对易于使用和学习。
- PHP’s programming syntax is fairly straightforward, similar to JavaScript and other languages you have likely encountered thus far. The major problems people have with PHP are the same ones they have with other languages.
- PHP的编程语法非常简单,类似于到目前为止可能遇到JavaScript和其他语言。 人们在使用PHP时遇到的主要问题与使用其他语言时遇到的问题相同。
php简介