1. 首页
  2. php

PHP – 简介

PHP最初是一个小型的开源项目,随着越来越多的人发现它的实用性而发展。Rasmus Lerdorf早在1994年就发布了PHP的第一个版本。

PHP简介

  • PHP是“PHP:Hypertext Preprocessor”的递归首字母缩写。
  • PHP是嵌入在HTML中的服务器端脚本语言。它用于管理动态内容,数据库,会话跟踪,甚至构建整个电子商务站点。
  • 它集成了许多流行的数据库,包括MySQL,PostgreSQL,Oracle,Sybase,Informix和Microsoft SQL Server。
  • PHP在执行时非常有趣,特别是在Unix端编译为Apache模块时。MySQL服务器一旦启动,即使在记录设置时间内使用巨大的结果集执行非常复杂的查询。
  • PHP支持大量主要协议,如POP3,IMAP和LDAP。PHP4增加了对Java和分布式对象架构(COM和CORBA)的支持,使得n层开发首次成为可能。
  • PHP是宽容的:PHP语言试图尽可能宽容。
  • PHP语法是C-Like。

PHP的常见用途

  • PHP执行系统功能,即从系统上的文件创建,打开,读取,写入和关闭它们。
  • PHP可以处理表单,即从文件中收集数据,将数据保存到文件,通过电子邮件发送数据,将数据返回给用户。
  • 您可以通过PHP添加,删除,修改数据库中的元素。
  • 访问cookie变量并设置cookie。
  • 使用PHP,您可以限制用户访问您网站的某些页面。
  • 它可以加密数据。

PHP的特点

五个重要特征使PHP的实用性成为可能 –

  • 简单
  • 效率
  • 安全
  • 灵活性
  • 熟悉

PHP中的“Hello World”脚本

要了解PHP,首先要从简单的PHP脚本开始。自“你好,世界!” 是一个重要的例子,首先我们将创建一个友好的小“Hello,World!” 脚本。

如前所述,PHP嵌入在HTML中。这意味着在您的普通HTML(或XHTML,如果您是最前沿的)中,您将拥有这样的PHP语句 –

<html>
   
   <head>
      <title>Hello World</title>
   </head>
   
   <body>
      <?php echo "Hello, World!";?>
   </body>

</html>

它会产生以下结果 –

[Hello, World!]

如果检查上面示例的HTML输出,您会注意到从服务器发送到Web浏览器的文件中不存在PHP代码。Web页面中存在的所有PHP都将从页面中处理和删除; 从Web服务器返回到客户端的唯一事情是纯HTML输出。

所有PHP代码必须包含在PHP解析器识别的三个特殊标记标记之一中。

<?php PHP code goes here ?>

<?    PHP code goes here ?>

<script language = "php"> PHP code goes here </script>

最常见的标签是<?php …?>,我们也会在教程中使用相同的标签。

零久对php这门语言初时是因为一个朋友,php可以用于开发后台合前端主要是数据交互。

原创文章,作者:零久SEO,如若转载,请注明出处:http://www.seo0j.com/266.html

发表评论

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

评论列表(16条)

  • fitflops sale clearance 2020年2月22日 上午6:17

    I must express appreciation to you just for bailing me out of this type of issue. After checking throughout the internet and getting principles which are not pleasant, I was thinking my entire life was well over. Living without the answers to the difficulties you’ve resolved through the site is a critical case, as well as ones which could have negatively damaged my entire career if I hadn’t come across the blog. That natural talent and kindness in controlling all the pieces was helpful. I’m not sure what I would have done if I had not come across such a solution like this. I can at this moment look ahead to my future. Thanks very much for the reliable and sensible guide. I won’t be reluctant to endorse the website to any person who needs care on this matter.

  • off white jordan 1 2020年2月25日 上午3:34

    Thanks a lot for providing individuals with an exceptionally brilliant chance to read from this site. It really is so excellent plus jam-packed with a lot of fun for me personally and my office mates to search the blog at the least 3 times in a week to find out the fresh items you will have. Of course, I am also actually fascinated with your fantastic hints you serve. Some 4 ideas on this page are undoubtedly the most suitable I’ve had.

  • adidas yeezy 2020年2月27日 下午2:39

    I would like to convey my love for your kindness for folks that need help on this one question. Your very own commitment to getting the solution across was quite functional and have empowered others like me to get to their desired goals. This important report implies so much a person like me and far more to my office workers. Thanks a lot; from each one of us.

  • balenciaga 2020年3月1日 上午6:59

    My wife and i ended up being absolutely peaceful when Edward managed to deal with his studies from the precious recommendations he obtained from your very own weblog. It is now and again perplexing to simply always be offering concepts that many other people may have been trying to sell. Therefore we fully understand we now have the writer to give thanks to for that. The specific explanations you have made, the simple web site navigation, the relationships you will give support to engender – it’s got all overwhelming, and it’s really aiding our son in addition to the family believe that this subject is fun, and that’s exceptionally vital. Thanks for all the pieces!

  • yeezy supply 2020年3月4日 上午3:25

    I simply had to appreciate you yet again. I do not know the things that I could possibly have gone through in the absence of the type of creative ideas discussed by you relating to such area. It truly was a very troublesome scenario in my circumstances, but viewing a professional style you processed it took me to jump with fulfillment. I am just thankful for this support as well as have high hopes you really know what an amazing job you happen to be undertaking instructing the mediocre ones by way of a blog. I am certain you haven’t got to know any of us.

  • russell westbrook shoes 2020年3月6日 上午8:14

    Thanks so much for providing individuals with an extraordinarily spectacular chance to read articles and blog posts from this website. It’s usually very superb and also jam-packed with fun for me personally and my office colleagues to search the blog at a minimum 3 times per week to read the new guidance you have got. And definitely, I am just actually pleased with your fabulous thoughts you give. Certain two points in this posting are certainly the most impressive we’ve ever had.

  • goyard handbags 2020年3月9日 上午3:25

    I have to express my appreciation to the writer just for rescuing me from this type of situation. Right after scouting throughout the online world and coming across notions which are not beneficial, I assumed my life was over. Existing without the presence of approaches to the issues you’ve solved as a result of this article is a critical case, and ones that could have negatively affected my entire career if I had not noticed the blog. The understanding and kindness in dealing with almost everything was very helpful. I don’t know what I would’ve done if I hadn’t encountered such a stuff like this. I can also now look ahead to my future. Thanks very much for this high quality and amazing help. I will not be reluctant to endorse the sites to any individual who would like guide on this situation.

  • hogan outlet 2020年3月11日 下午1:18

    I in addition to my pals came studying the best techniques found on the blog and then immediately I got an awful suspicion I had not thanked you for those techniques. All of the ladies are already as a consequence happy to study them and already have surely been using them. Thanks for really being considerably helpful and then for going for this kind of great information most people are really desirous to know about. My honest regret for not expressing appreciation to you earlier.

  • jordan shoes 2020年3月12日 上午7:13

    I precisely desired to say thanks once more. I am not sure what I could possibly have sorted out in the absence of those creative concepts revealed by you directly on this theme. It truly was the intimidating issue for me personally, nevertheless being able to see a expert approach you dealt with the issue made me to leap with joy. Now i’m thankful for the assistance and thus expect you know what a powerful job you are undertaking training the rest through the use of your blog. I am sure you’ve never encountered all of us.

  • Kanye West shoes 2020年3月15日 上午7:22

    I wanted to develop a note to thank you for those awesome points you are writing here. My extended internet look up has now been compensated with brilliant tips to go over with my two friends. I ‘d point out that most of us website visitors actually are truly blessed to dwell in a very good network with many wonderful professionals with very helpful hints. I feel very fortunate to have encountered your entire weblog and look forward to many more exciting minutes reading here. Thanks a lot once again for a lot of things.

  • nike shoes 2020年3月18日 上午3:46

    I precisely had to thank you so much yet again. I am not sure the things that I would have gone through in the absence of the techniques contributed by you directly on such a question. It previously was a scary concern for me personally, nevertheless spending time with the specialised technique you solved the issue made me to jump for joy. I’m happy for your guidance and hope that you comprehend what a powerful job you happen to be getting into educating the others all through your webblog. Most likely you haven’t encountered any of us.

  • supreme hoodie 2020年3月20日 下午6:49

    I want to show my thanks to the writer just for bailing me out of this issue. Just after researching through the world wide web and coming across views which are not powerful, I assumed my life was well over. Living without the strategies to the problems you have solved by means of your guide is a serious case, and the kind that might have badly affected my entire career if I had not encountered your web blog. Your main expertise and kindness in handling almost everything was priceless. I am not sure what I would’ve done if I hadn’t come across such a step like this. I’m able to at this moment relish my future. Thanks a lot very much for your expert and results-oriented help. I will not hesitate to propose your site to anyone who would like support on this topic.

  • kobe byrant shoes 2020年3月23日 上午8:34

    I wish to show some appreciation to this writer for bailing me out of this type of issue. As a result of searching throughout the search engines and finding thoughts which are not beneficial, I assumed my entire life was gone. Existing minus the approaches to the problems you have solved through your good post is a critical case, as well as ones which may have in a wrong way affected my entire career if I had not come across your web site. Your good training and kindness in dealing with all the things was valuable. I am not sure what I would have done if I hadn’t come across such a step like this. I am able to now look ahead to my future. Thanks for your time so much for this expert and amazing guide. I won’t be reluctant to propose your web site to anyone who should get tips on this subject matter.

  • supreme hoodie 2020年3月26日 上午4:43

    I would like to show my love for your kindness in support of those individuals that must have guidance on this particular study. Your very own dedication to passing the solution throughout ended up being surprisingly good and has continually allowed many people just like me to realize their endeavors. Your warm and helpful key points implies much to me and far more to my fellow workers. Warm regards; from everyone of us.

  • supreme new york 2020年3月29日 上午9:52

    My wife and i got now more than happy that Chris managed to finish up his basic research through your precious recommendations he was given out of your blog. It is now and again perplexing just to happen to be handing out points which the others may have been selling. We see we now have the website owner to be grateful to because of that. Most of the explanations you have made, the straightforward blog menu, the friendships you will help to instill – it’s most great, and it’s aiding our son in addition to us reason why that concept is awesome, and that is very essential. Many thanks for all the pieces!

  • coach outlet 2020年4月1日 上午9:09

    I and my guys were found to be reviewing the good tips on your web site then instantly got an awful suspicion I never expressed respect to the site owner for those secrets. All of the young men came as a consequence warmed to see them and have in effect in fact been tapping into these things. Appreciate your genuinely really kind and for deciding on variety of amazing subject matter most people are really desirous to know about. Our own honest apologies for not saying thanks to you sooner.

联系我们

15555333984

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

邮件:lxa6@qq.com

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

QR code