1. 首页
  2. php

什么是PHP?

PHP(“PHP: Hypertext Preprocessor”,超文本预处理器的字母缩写)是一种被广泛应用的开放源代码的多用途脚本语言,它可嵌入到 HTML中,尤其适合 web 开发。

以上是一个简单的回答,不过这是什么意思呢?请看如下例子:

什么是PHP

Example #1 一个介绍性的范例

<html>
<head>
<title>这是我的一个php程序零久seo</title>
</head>
<body>
<?php
echo "Hi, I'm a PHP script!";
?>
</body>
</html>

请注意这个范例和其它用 C 或 Perl 语言写的脚本之间的区别——与用大量的命令来编写程序以输出 HTML 不同的是,PHP 页面就是 HTML,只不过在其中嵌入了一些代码来做一些事情(在本例中输出了 “Hi, I’m a PHP script!”)。PHP 代码被包含在特殊的起始符和结束符 <?php 和 ?> 中,使得可以进出“PHP 模式”。

和客户端的 JavaScript 不同的是,PHP 代码是运行在服务端的。如果在服务器上建立了如上例类似的代码,则在运行该脚本后,客户端就能接收到其结果,但他们无法得知其背后的代码是如何运作的。甚至可以将 web 服务器设置成让 PHP 来处理所有的 HTML 文件,这么一来,用户就无法得知服务端到底做了什么。

使用 PHP 的一大好处是它对于初学者来说极其简单,同时也给专业的程序员提供了各种高级的特性。当看到 PHP 长长的特性列表时,请不要害怕。可以很快的入门,只需几个小时就可以自己写一些简单的脚本。

尽管 PHP 的开发是以服务端脚本为目的,但事实上其功能远不局限与此。请继续读后面的章节,在“PHP 能做什么”一节中将获得更多的信息。如果对 web 编程感兴趣,也可以阅读相关的PHP简明教程。

本文来自,经授权后发布,本文观点不代表零久SEO立场,转载请联系原作者。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

评论列表(50条)

  • 零久SEO 2019年5月2日 下午4:55

    关于PHP的开发文档可以加我qq166222553领取,免费。

  • yeezys 2020年2月23日 上午12:21

    I just wanted to compose a simple message to be able to appreciate you for those fabulous recommendations you are posting at this site. My time-consuming internet search has at the end of the day been paid with incredibly good strategies to go over with my classmates and friends. I would declare that many of us readers are definitely lucky to be in a wonderful place with many outstanding professionals with insightful suggestions. I feel very grateful to have seen the web site and look forward to tons of more brilliant times reading here. Thanks once again for a lot of things.

  • yeezy 2020年2月25日 上午10:44

    I must show thanks to the writer for rescuing me from such a situation. Because of looking through the internet and coming across concepts that were not powerful, I thought my entire life was over. Being alive without the solutions to the difficulties you have resolved through this site is a critical case, and the kind which could have badly damaged my career if I hadn’t discovered your website. Your personal competence and kindness in playing with all things was valuable. I am not sure what I would have done if I hadn’t come upon such a point like this. It’s possible to now look forward to my future. Thanks for your time so much for your reliable and result oriented guide. I won’t think twice to endorse your site to anybody who should get care about this subject matter.

  • kobe shoes 2020年3月1日 下午8:33

    I wanted to send you that very small note to be able to thank you so much the moment again for all the extraordinary tricks you have documented here. This is pretty generous with people like you to grant freely exactly what many of us could possibly have supplied as an e book to generate some bucks on their own, precisely considering the fact that you might well have done it if you ever decided. The principles also acted like the easy way to know that many people have similar desire really like mine to understand very much more in terms of this issue. I know there are millions of more fun situations ahead for those who view your site.

  • canada goose jacket 2020年3月4日 上午9:36

    I must point out my passion for your kind-heartedness supporting those individuals that really want help on this content. Your personal commitment to passing the solution all around turned out to be astonishingly effective and have constantly helped girls like me to reach their desired goals. Your new helpful hints and tips signifies a great deal to me and still more to my fellow workers. Many thanks; from each one of us.

  • golden goose sneakers 2020年3月7日 上午3:05

    I simply wanted to thank you so much yet again. I am not sure the things that I could possibly have used in the absence of the type of tricks documented by you relating to that question. Previously it was a very hard case in my circumstances, however , spending time with the very professional strategy you dealt with that took me to leap for contentment. Extremely happier for your work and in addition sincerely hope you know what an amazing job you were doing training some other people through your web site. I’m certain you’ve never got to know any of us.

  • nike max 2020年3月9日 上午9:33

    I have to show appreciation to you just for rescuing me from this circumstance. Because of researching through the search engines and finding ideas which were not powerful, I thought my life was over. Existing without the strategies to the issues you have sorted out by means of your good guide is a crucial case, and the ones that might have in a negative way damaged my entire career if I had not noticed your web page. Your own training and kindness in touching almost everything was excellent. I’m not sure what I would have done if I hadn’t come upon such a solution like this. It’s possible to now relish my future. Thanks so much for the expert and amazing guide. I won’t think twice to suggest your site to anyone who should receive care on this situation.

  • KiaBaria 2020年3月13日 上午8:17
  • LisaBaria 2020年3月13日 下午12:05
  • LisaBaria 2020年3月14日 上午5:08
  • kyrie 6 2020年3月16日 上午2:47

    I must show thanks to you for rescuing me from this particular predicament. As a result of exploring throughout the world wide web and obtaining thoughts which are not helpful, I figured my entire life was done. Being alive devoid of the approaches to the problems you’ve sorted out by means of your article content is a crucial case, as well as ones which could have badly affected my entire career if I hadn’t noticed your web blog. Your own capability and kindness in playing with all things was tremendous. I am not sure what I would’ve done if I hadn’t come across such a point like this. I can also now look forward to my future. Thanks for your time so much for this reliable and effective help. I will not be reluctant to refer your blog post to anyone who will need assistance about this situation.

  • WimBaria 2020年3月16日 上午9:41
  • KiaBaria 2020年3月16日 下午7:18
  • louboutin shoes 2020年3月18日 上午11:15

    I would like to express some appreciation to this writer for bailing me out of this incident. Right after researching through the online world and coming across recommendations which were not beneficial, I assumed my life was well over. Being alive minus the solutions to the problems you have sorted out as a result of this short article is a critical case, as well as the ones that might have adversely affected my entire career if I hadn’t discovered your blog post. Your competence and kindness in playing with every part was vital. I’m not sure what I would’ve done if I hadn’t discovered such a thing like this. I’m able to now relish my future. Thanks a lot very much for the professional and result oriented guide. I won’t hesitate to recommend the website to anybody who needs guide on this problem.

  • WimBaria 2020年3月18日 下午3:26
  • KiaBaria 2020年3月19日 上午7:40
  • LisaBaria 2020年3月19日 下午1:14
  • KiaBaria 2020年3月21日 上午4:37
  • lebron 10 2020年3月21日 上午6:39

    My husband and i ended up being really fortunate that John could carry out his researching by way of the precious recommendations he made through your web page. It is now and again perplexing to just happen to be freely giving information and facts which some people may have been making money from. And we do know we need the writer to thank for that. The most important illustrations you made, the simple website navigation, the relationships you can help create – it’s all overwhelming, and it’s letting our son in addition to our family know that that matter is thrilling, which is exceptionally indispensable. Thanks for everything!

  • LisaBaria 2020年3月21日 上午10:57
  • Human Races 2020年3月22日 上午3:24

    http://www.pandoras.fr/ Pandora Charms

  • WimBaria 2020年3月22日 上午3:26
  • KiaBaria 2020年3月22日 下午8:09
  • WimBaria 2020年3月23日 下午3:15
  • NBA Jerseys 2020年3月23日 下午7:52

    xqxrpwdcbrz,If you have any struggle to download KineMaster for PC just visit this site.

  • lebron shoes 2020年3月24日 上午3:43

    I want to show some thanks to you just for rescuing me from this condition. Just after exploring throughout the the net and seeing proposals which were not helpful, I was thinking my entire life was gone. Being alive without the presence of approaches to the problems you have solved by way of the review is a serious case, as well as the ones which might have adversely damaged my career if I hadn’t noticed the blog. Your personal natural talent and kindness in controlling the whole lot was invaluable. I am not sure what I would’ve done if I hadn’t discovered such a step like this. It’s possible to at this time look ahead to my future. Thanks a lot so much for the high quality and sensible help. I will not be reluctant to recommend the website to any person who desires tips on this subject matter.

  • LisaBaria 2020年3月24日 上午6:05
  • KiaBaria 2020年3月24日 下午12:08
  • WimBaria 2020年3月24日 下午3:36
  • Yeezy 380 2020年3月25日 下午2:16

    klriaiev,Very helpful and best artical information Thanks For sharing.I LOve your Blog!

  • Yeezy Mafia 2020年3月26日 上午5:05
  • balenciaga shoes 2020年3月26日 下午1:36

    I enjoy you because of each of your work on this website. My mum take interest in conducting investigation and it is obvious why. Most of us know all of the dynamic method you produce vital suggestions by means of your web blog and increase response from some other people about this article while my child has been studying a great deal. Have fun with the remaining portion of the year. You’re the one doing a powerful job.

  • Yeezy 2020年3月26日 下午8:01
  • Ugg Boots 2020年3月27日 上午6:22
  • KiaBaria 2020年3月27日 上午6:49
  • LisaBaria 2020年3月28日 上午2:17
  • LisaBaria 2020年3月28日 下午6:52
  • Pandora Soldes 2020 2020年3月29日 上午6:13
  • WimBaria 2020年3月29日 下午6:46
  • golden goose 2020年3月30日 上午3:47

    I precisely had to say thanks once again. I’m not certain what I could possibly have worked on in the absence of the actual methods revealed by you concerning my question. Certainly was an absolute scary scenario in my circumstances, however , witnessing the very specialised strategy you resolved the issue forced me to leap over fulfillment. I’m happier for this help and pray you recognize what a powerful job you happen to be undertaking instructing some other people thru a site. I know that you haven’t met all of us.

  • KiaBaria 2020年3月30日 下午7:22
  • Nike Air Max 270 2020年3月31日 上午3:47
  • MLB Jerseys 2020年3月31日 下午4:29
  • WimBaria 2020年4月1日 上午12:32
  • nike shoes 2020年4月2日 上午3:27

    I simply had to appreciate you yet again. I am not sure the things that I might have taken care of in the absence of those methods shown by you relating to such a situation. It was a very fearsome circumstance for me personally, but taking a look at the very skilled way you resolved that made me to cry with joy. Now i am thankful for this information and thus hope that you find out what an amazing job you are always getting into instructing the rest via your web site. I am sure you have never got to know all of us.

  • KiaBaria 2020年4月2日 上午10:16
  • LisaBaria 2020年4月3日 上午3:49
  • Nike Air Force 1 2020年4月3日 上午5:30
  • viagra online no script 2020年4月3日 上午7:11

    viagra online no script
    [url=http://www.vagragenericaar.org/#]cheap sildenifil no prescription[/url] http://www.vagragenericaar.org/

联系我们

15555333984

在线咨询:点击这里给我发消息

邮件:lxa6@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code