php新手项目_而且,我是PHP新手

php新手项目

Foreword (May 2015)

前言(2015年5月)

This web page has appeared at Google.  It's definitely worth considering!

该网页已出现在Google上。 绝对值得考虑!

https://www.google.com/about/careers/students/guide-to-technical-development.html

https://www.google.com/about/careers/students/guide-to-technical-development.html

How to Know You are Making a Difference at EE

如何知道您正在EE上有所作为

In August, 2013, one of my colleagues posted this, and it made my heart glad.

2013年8月,我的一位同事发布了此消息,这让我很高兴。

Thanks so much Ray!  I actually haven't posted in a while because at your suggestion I got a few books and spent the last couple of months reading and learning and it's made a world of difference, so thanks a ton for that suggestion as well!

非常感谢Ray! 实际上,我有一段时间没有发布信息,因为在您的建议下,我得到了几本书,并在过去的几个月里花了很多时间阅读和学习,这确实与众不同,因此也非常感谢您的建议!

"And by the way,... I am New to PHP"

“而且,……我是PHP的新手

So many PHP questions at Experts-Exchange include (or should include) that statement that it got me thinking about how to advise new programmers on ways to begin learning PHP.  The popularity of PHP is undeniable; it powers an overwhelming number of web sites, from the very smallest to the giants like Facebook, hundreds of thousands of WordPress blogs, and everything in between.  So it makes sense that any web developer would need to have some foundation in the PHP language.  And for many novice programmers, PHP is the first language they try to learn.

在Experts-Exchange上的许多PHP问题都包含(或应该包含)该陈述,这让我开始思考如何就开始学习PHP的方式向新程序员提供建议。 PHP的流行是不可否认的。 它为绝大多数网站提供支持 ,从最小的网站到Facebook之类的巨头,成千上万的WordPress博客,以及介于两者之间的所有内容 。 因此,任何Web开发人员都需要具有PHP语言基础。 对于许多新手程序员来说, PHP是他们尝试学习的第一门语言

PHP came from humble beginnings; it was originally captioned "Personal Home Page" and was intended to be a language so easy to use, that "even Grandma could learn to use PHP."  And that was fine in the 1990's before the advent of object-oriented programming, hackers, spam, and web services.  But the online environment has grown up and PHP has been forced to grow up, too.  Today, while PHP can still perform simple tasks, PHP can also power enormous database-driven applications that build online communities and analyze mountains of information.

PHP源于谦虚; 它最初的标题是“个人主页”,并且旨在成为一种易于使用的语言,以至于“甚至奶奶都可以学习使用PHP”。 在1990年代,面向对象程序设计,黑客,垃圾邮件和Web服务问世之前,这还不错。 但是在线环境已经发展壮大,PHP也被迫发展壮大。 如今,尽管PHP仍然可以执行简单的任务,但PHP还可以支持庞大的数据库驱动的应用程序,这些应用程序可以构建在线社区并分析大量信息。

My favorite description of PHP, disarming in its elegance and simplicity, is "What PHP can do is convert a static website that has content that has to be changed by hand into a dynamic one that can display content based on any criteria you can think of."

对PHP的最喜欢的描述是消除其优雅和简单,这是“ PHP可以做的是将一个静态网站(其内容必须手动更改)转换为一个动态网站,该网站可以根据您认为的任何条件显示内容” ”。

Getting started with PHP can be daunting, especially if you do not have a background in computer science.  This article will give you some learning resources to get the background you need and will introduce several popular and effective ways to learn PHP.  But there is something you might want to read before you finish this article.  Every professional programmer I know thinks that this is an article of wisdom.  You can take it in if you have seven minutes.  Then come back and finish this article.

PHP入门可能令人生畏,尤其是如果您没有计算机科学背景。 本文将为您提供一些学习资源,以获取所需的背景知识,并介绍几种流行且有效的学习PHP的方法。 但是,在完成本文之前,您可能需要阅读一些内容。 我认识的每个专业程序员都认为这是一条智慧的文章 。 如果您有七分钟的时间,可以接受。 然后返回并完成本文。

Getting the Right Foundation

获得正确的基础

If you really want to be a professional programmer, you probably want to go to college to major in computer science or electrical engineering.  Almost every major college and university teaches these subject, and the principles are not very hard to learn, but it takes time and practice to turn the learned principles into praxis.  Even if you're not sure about making a career in programming, if you're read this far you probably want to consider taking an Introduction to Computer Science class.  Fortunately, these classes are now available online, for free, using the same syllabus, curriculum and learning materials that the colleges use.  

如果您真的想成为一名专业程序员,则可能要上大学,攻读计算机科学或电气工程专业。 几乎每个大专院校都教授这些主题,并且学习原理并不难,但是将所学原理转化为实践需要时间和实践 。 即使您不确定要从事编程事业,也可以通过阅读《计算机科学入门》课来学习。 幸运的是,这些课程现在可以免费在线使用,使用与大学相同的教学大纲,课程和学习材料。

As but one example, here is what M.I.T. offers:

作为一个例子, 麻省理工学院提供了以下内容:

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/Syllabus/

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/Syllabus/

If you're serious about learning programming, you will need a little math (but not very much).  This series of video lectures will give you a good foundation.

如果您认真学习编程,则需要一些数学知识(但不是很多)。 这一系列的视频讲座将为您奠定良好的基础。

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/video-lectures/

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/video-lectures/

Learning to Think Like a Programmer

学习像程序员一样思考

For a variety of reasons, you're unlikely to find a basic computer science class that teaches PHP.  PHP is "easy" and these classes are for scientists who like things hard (I'm only joking a little bit).  Expect to find C, Python, Java, JavaScript and similar highly structured programming languages in the beginning classes.  Don't worry about that -- every programmer who achieves anything noteworthy has written programs in many different languages.  The ideas from one language or another bring about a level of intellectual cross-pollination that helps you think about problems from different perspectives and map problems onto different computational frameworks.  And at the most basic levels, all programming languages share many common aspects.  The greatest difference is the written syntax we use to express our ideas.

由于各种原因,您不太可能找到教授PHP的基础计算机科学课程。 PHP是“简单”的课程,这些课程适用于喜欢辛勤工作的科学家(我只是在开玩笑)。 期望在开始的课程中找到C,Python,Java, JavaScript和类似的高度结构化的编程语言。 不必担心,每个成就卓越的程序员都可以使用多种语言编写程序。 一种或另一种语言的想法带来了一定程度的智力交叉授粉,可帮助您从不同的角度思考问题并将问题映射到不同的计算框架。 在最基本的层次上,所有编程语言都有许多共同的方面。 最大的不同是我们用来表达想法的书面语法。

Do Not Waste Time on Non-Working Code

不要浪费时间在不工作的代码上

A programming language is a tool that builds a sequence of instructions.  The instructions tell the computer what we want it to do.  For almost everything you might do with PHP, the thing we want the computer to do is manipulate data.  Each programming problem can be defined and understood in terms of an input and an output, with the computer programming being the intermediary that transforms the input into the output.  If you think about that for a little while, you will come to the same conclusion that almost every experienced programmer comes to: it does nobody any good to post code that does not work.  Instead define and post the data and you will be amazed how quickly you can find clear, easy-to-understand answers.

编程语言是一种构建指令序列的工具。 这些说明告诉计算机我们要执行的操作。 对于PHP几乎可以做的所有事情,我们希望计算机做的就是操纵数据 。 可以根据输入输出来定义和理解每个编程问题,其中计算机编程是将输入转换为输出的中介。 如果考虑一会儿,您将得出几乎每个有经验的程序员都会得出的相同结论: 发布不起作用的代码对任何人都没有好处 。 取而代之的是定义和发布数据 ,您会惊奇地发现您能以多快的速度找到清晰,易于理解的答案。

Expect to Spend a Lot of Time Debugging

期望花费大量时间进行调试

You will find that you're human and the computer is not.  Problems expressed in human languages are turned into solutions expressed in computer languages.  This process is full of ambiguity, double-meanings, and confusion.  Humans share culture, but computers require precision at a sub-microscopic level.  Even a single character out of place can render a computer program useless (or worse, destructive).  It's very rare that a programmer can write more than a few lines of code without introducing an unwanted element.  The process of correcting and removing these unwanted elements is called "debugging" and until you have several years of programming experience, it will consume most of the time you spend programming.  More about programming and human factors, as well as many interesting observations from the trenches is available in Jeff Atwood's writings.

您会发现自己是人,而计算机不是。 用人类语言表达的问题变成了用计算机语言表达的解决方案。 这个过程充满了歧义,双重含义和混乱。 人类拥有共同的文化,但是计算机需要在亚微观水平上保持精确。 即使是单个字符,也可能使计算机程序无效(或更糟的是破坏性的)。 程序员可以编写多行代码而不引入多余元素的情况很少见。 纠正和删除这些不需要的元素的过程称为“调试”,直到您有几年的编程经验为止,它将花费大部分时间来进行编程。 Jeff Atwood的著作中提供了有关编程和人为因素的更多信息,以及关于战es的许多有趣观察。

Deconstruct Problems Until They Are Small Enough to Solve at a Glance

解构问题,直到问题无法解决为止

Complex programs are made up of simpler programs, and simpler programs are made up of even simpler programs.  A mental process of deconstructing problems underlies all programming activities.  As you learn PHP, you will find that you deconstruct complex problems into several smaller problems that are readily solved using PHP programming solutions.

复杂的程序由更简单的程序组成,更简单的程序由更简单的程序组成。 解构问题的思维过程是所有编程活动的基础。 学习PHP时,您会发现将复杂的问题分解为几个较小的问题,这些问题可以使用PHP编程解决方案轻松解决。

You may have heard of the phrase, "Hello World."  It is the name given to the simplest example of the solution to any programming problem, and it demonstrates success in some small aspect of building a more complex program.  In PHP, the "Hello World" exercise looks something like this.

您可能听说过“ Hello World”一词。 它是解决任何编程问题的最简单示例的名称,它在构建更复杂的程序的某些小方面证明了成功。 在PHP中,“ Hello World”练习看起来像这样。

<?php echo "Hello World."; 

This simple PHP script proves that PHP is installed correctly and that it can produce output that is visible on a web browser.  More importantly, it removes many elements of confusion and ambiguity.  What if this script did not work?  Where would you look for a solution?  What symptoms of failure could you find?  Who can help?  All of these uncertainties and doubts impinge on the process of debugging.  And thus we come to the first and most important part of thinking like a programmer: Make the larger problems smaller by reducing each of the larger problems to a collection of smaller problems.

这个简单PHP脚本证明PHP已正确安装,并且可以产生在Web浏览器上可见的输出。 更重要的是,它消除了许多混乱和歧义的因素。 如果该脚本不起作用怎么办? 您在哪里寻找解决方案? 您会发现什么故障症状? 谁能帮忙? 所有这些不确定性和疑问都会影响调试过程。 因此,我们进入了像程序员一样思考的第一个也是最重要的部分:通过将每个较大的问题减少为一系列较小的问题,使较大的问题变小。

Do this iteratively until the smaller problems are so small that the solution is obvious.  The small solutions then become the building blocks of the larger solutions.  As you construct larger solutions from smaller building blocks, you will hide the details so that the result works like a vending machine - providing useful services to many clients (either programs or people).  Programmers often refer to such self-contained units as a "black box."

反复执行此操作,直到较小的问题很小到解决方案显而易见为止。 小解决方案便成为大解决方案的基础 。 从较小的构建块构造较大的解决方案时,您将隐藏细节,以便结果像自动售货机一样工作-为许多客户(程序或人员)提供有用的服务。 程序员通常将这些独立的单元称为“黑匣子”。

Learning the Language of Programmers

学习程序员的语言

A shared culture has a shared language and many terms of art.  You can learn something of PHP without knowing much about general purpose programming, but your learning will be faster and easier if you understand the language that programmers use.  Many familiar words assume new meanings.  For example, the word class takes on a unique meaning when it's applied in the context of computer programming.

共同的文化具有共同的语言和许多艺术术语。 您可以在不了解通用编程的情况下学习PHP的知识,但是如果您了解程序员使用的语言,您的学习就会更快,更轻松。 许多熟悉的单词具有新的含义。 例如,单词在计算机编程环境中使用时具有独特的含义。

I am not suggesting that you need to read or memorize every term of art (a professional will) but you need some good references that you can use to look up words that are unfamiliar or are used in unfamiliar ways.  You might want to take an afternoon to browse these glossaries.

我并不是建议您需要阅读或记住每个艺术术语(专业人士的意愿),但是您需要一些好的参考资料,可以用来查找不熟悉或不熟悉的单词。 您可能需要花一个下午来浏览这些词汇表。

LabAutopedia

实验室

Henson's Glossary

汉森的词汇

Cal State CS202

加州州立CS202

WhatIs.com TechTarget Programming Words

WhatIs.com TechTarget编程字

Learning the Techniques of Programmers

学习编程技巧

All good programmers have been forced at one time or another to research a subject that they know nothing about.  They have to find out numerous details (too many to remember) and develop code that handles these details.  It's a huge exercise in short-term memory, and it's a huge investment of time.  You wouldn't want to have to do it over again.

所有优秀的程序员被迫一次或一次地研究他们一无所知的主题。 他们必须找出许多细节(要记住的东西太多),并开发处理这些细节的代码。 这是短期记忆中的一项巨大工作,也是对时间的一项巨大投资。 您不想再做一遍。

Unfortunately, some programmers are condemned to do it over and over again because they didn't write the code clearly, or they used thoughtless variable names, or they left out the comments.  And when they need to reuse that piece of code, they find themselves looking at it and wondering things like, "Did I test this enough?" or worse, "What was I thinking?"  You can avoid this problem by following a few simple rules.

不幸的是,有些程序员一遍又一遍地被谴责,因为他们没有清晰地编写代码,或者他们使用了粗心的变量名,或者省略了注释 。 当他们需要重用那段代码时,他们发现自己正在查看它,并想知道诸如“我测试够了吗?”之类的东西。 或更糟糕的是,“我在想什么?” 您可以通过遵循一些简单的规则来避免此问题。

Before you begin writing code, learn the "PSR" basics.  These are valuable standards.  They will make your programming easy to read and understand, and they will make your code look professional (highly valuable if you want to get a job as a programmer).  Here are the two links you should study.

在开始编写代码之前,请学习“ PSR”基础知识。 这些是有价值的标准。 它们将使您的程序易于阅读和理解,并使您的代码看起来更专业(如果您想当一名程序员,那将非常有价值)。 这是您应该学习的两个链接。

http://www.php-fig.org/psr/psr-1/

http://www.php-fig.org/psr/psr-1/

http://www.php-fig.org/psr/psr-2/

http://www.php-fig.org/psr/psr-2/

1. Whenever you're required to solve a problem that you have never solved before, make a teaching example from the solution.  Collect a library of these.

1.每当需要解决从未有过的问题时,请从解决方案中举出一个教学示例。 收集这些库。

2. Whenever possible use meaningful variable names, eg, if the value is "Today's date" name the variable $today instead of something useless like $x.

2.尽可能使用有意义的变量名,例如,如果值是“ Today's date”,则将变量$ today命名为$ today,而不要使用$ x之类的无用变量。

3. Use comments to say what your programming is intended to do.  Often you will find that simply writing the commentsfirst, before you write a single line of code, will help you consolidate your thinking.

3.使用注释说出您的程序打算做什么。 通常你会发现,简单地写了评论 第一 ,你写的一行代码前,会帮助你巩固你的思维。

4. Test iteratively as you build the code.  Don't write more than a few lines without testing.  Use the principles of Test-Driven Development.

4.在构建代码时进行迭代测试。 未经测试,请勿多写几行。 使用测试驱动开发的原则。

5. Programming is all about the data.  Learn about var_dump() and make regular use of it!

5.编程是关于数据的全部。 了解var_dump()并定期使用它!

6. Avoid copying code you find on the internet, especially code that has a lot of compound statements.  Instead of copying, deconstruct the code, taking a moment to ask, "why?" and rewriting the code in your own words, with your own explanatory comments.

6.避免复制您在互联网上找到的代码,尤其是包含大量复合语句的代码。 而不是复制,而是解构代码,花一点时间问“为什么?” 并用自己的文字和解释性注释重写代码。

7. Adopt a coding standard and adhere to it rigidly.  With discipline comes great power.

7. 采用编码标准并严格遵守。 纪律带来强大的力量。

Learning How to Get Help: the SSCCE

学习如何获得帮助: SSCCE

Anyone who says he is a self-taught programmer is missing something.  You cannot make this stuff up - you have to learn it from a variety of sources, and one of the most important sources is the community of programmers who surround you.  Perhaps you're in a university class where you can learn from your colleagues and classmates.  Or perhaps you're a regular at Experts-Exchange and Stack Overflow.  In any learning community you need to know how to share ideas with others.  That's where the SSCCE comes in.  If the only thing you take away from this article is the SSCCE, it will have been worth my time to write it and worth your time to read it.  Follow the link, read the page (there is only one page) and embrace the principles!  The SSCCE is not alone in the universe, other authors have given voice to the same concept: a problem well stated is a problem half solved.

任何说自己是自学成才的程序员的人都缺少一些东西。 您无法整理这些东西-您必须从各种资源中学习它,而最重要的资源之一就是围绕着您的程序员社区。 也许您正在上大学,可以向同事和同学学习。 也许您是Experts-ExchangeStack Overflow的常客。 在任何学习社区中,您都需要知道如何与他人分享想法。 这就是SSCCE的用武之地。如果您从本文中摘走的唯一东西是SSCCE ,那将是我值得花时间来编写它,而又值得您去阅读它。 跟随链接,阅读页面(只有一页)并接受原则! SSCCE在宇宙中并不孤单,其他作者也表达了相同的观点:一个明确陈述的问题是一半解决的问题。

Think about the data - what do you have for input and what do you want for output.  Try to assemble that information before you ask the question.  Then you can say, "Here's what I've got and here's what I want."  That makes for a clear problem definition.  Clear problem definitions will save you an amazing amount of time.  As Charles Kettering said, "A problem well stated is a problem half solved."

考虑一下数据-您要输入什么,而要输出什么。 提出问题之前 ,请尝试收集这些信息。 然后您可以说:“这就是我所拥有的,这就是我想要的。” 这样就可以明确定义问题。 清晰的问题定义将为您节省大量时间。 正如查尔斯·凯特林(Charles Kettering)所说,“一个明确说明的问题是一个已解决的问题”。

Try to avoid complicating the situation with an unnecessary explanation, when an input/output example could be used instead.  This is an actual quote from a question posted here at EE: "take that number, split it into an array. so 25 would become [2,5], or 12 would become [1,2] then use those to determine which image to show in the basket count, then loop the array to determine which images to show"  What's the author trying to say?  Your guess is as good as mine.

当可以使用输入/输出示例代替时,请尝试避免不必要的解释使情况复杂化。 这是在EE上发布的一个问题的实际引用:“将这个数字分成一个数组。因此25将变成[2,5],或者12将变成[1,2],然后使用那些来确定哪个图像以显示在篮子中,然后循环排列以确定要显示的图像”作者在说什么? 你的猜测和我的一样好。

Learning PHP from PHP.net

从PHP.net学习PHP

Now that we have introduced the deep background stuff, and shown you how to frame a problem and ask for help, it's time to get into the part of this article that is about learning -- and using -- PHP.

现在,我们已经介绍了深入的背景知识,并向您展示了如何解决问题并寻求帮助 ,现在是时候进入本文中有关学习和使用PHP的部分了。

A good place to start is with php.net, where you will find the best online technical documentation in the world.

一个不错的起点是php.net ,在这里您可以找到世界上最好的在线技术文档。

If you do not read the online documentation, you're robbing yourself, stealing valuable time from learning.  Instead of learning from the experience and writings of others, you'll be learning by trial and error, maybe from reading other people's programs.  That takes longer.  A lot longer.  And it's full of risk.  Trying to learn programming by trial and error is like trying to learn to bake by looking at an apple pie.  Sure you can appreciate the finished product, but looking at a pie will tell you nothing of the other ingredients, the processes and the tools used to make the pie.  Likewise, a finished program tells you nothing of the thought processes of the developers, nor of the assumptions they made or the test data they used.  So don't try to learn that way.  Instead, exploit the php.net web site for all its worth.  Here is how.

如果您不阅读在线文档,那就是在抢劫自己,从而浪费了宝贵的学习时间。 与其从别人的经验和著作中学习,不如通过反复试验来学习,也许是从阅读别人的程序中学习。 这需要更长的时间。 更长的时间。 而且充满风险。 尝试通过反复试验来学习编程就像通过看苹果派来学习烘焙一样。 当然,您可以欣赏制成品,但是看着馅饼不会告诉您其他任何成分,制作馅饼的过程和工具。 同样,完成的程序也不会告诉您开发人员的思维过程,开发人员所做的假设或使用的测试数据。 所以不要尝试那样学习。 相反,请充分利用php.net网站 。 这是怎么回事。

New in 2014: PHP has an About the Manual page, including How to Read a Function Definition and links to Support for New Users.

2014年的新功能: PHP的“ 关于手册”页面包括“ 如何阅读功能定义”以及指向“ 支持新用户”的链接。

PHP has a "getting started" page.

PHP有一个“ 入门 ”页面。

PHP has an introductory tutorial.  No excuses -- Just Do It!

PHP有一个入门教程 。 没有借口-随便做吧!

PHP has an omnibus FAQ page.

PHP有一个omn​​ibus常见问题页面

PHP has its entire manual online!

PHP 在线提供了完整的手册

PHP has its own Security page and it is required reading, no excuses!

PHP有其自己的“ 安全性”页面需要阅读 ,没有任何借口!

PHP has the language reference online.   No excuses here either.  You must read these sections and every one of the associated links:

PHP在线提供了语言参考 。 这里也没有任何借口。 您必须阅读以下部分以及每个相关链接:

Basic Syntax

基本语法

Types

种类

Variables

变数

Constants

常数

Expressions

表达方式

Operators

经营者

Control Structures

控制结构

Functions

功能

Predefined Variables

预定义变量

If you want to move beyond basic PHP programming and begin collaboration with others, you want to read these sections, too.

如果您想超越基本PHP编程并开始与其他人合作,那么您也阅读这些部分。

Classes and Objects

类和对象

Exceptions

例外情况

References

参考资料

If you want to interact with software or data on other servers you need to read these sections.

如果要与其他服务器上的软件或数据进行交互,则需要阅读这些部分。

Context Options

上下文选项

Protocols and Wrappers

协议和包装

If you want to learn from the collective wisdom of others, these FAQ pages are very helpful:

如果您想学习他人的集体智慧,这些常见问题解答页面将非常有帮助:

Using PHP

使用PHP

PHP and HTML

PHP和HTML

PHP and Databases

PHP和数据库

Part of what makes php.net so valuable is the function reference.  PHP has, at this writing, over 1,500 built-in functions.  You can't memorize all of them, so you need a quick way to refer to them.  When I am programming I have a window open to php.net at all times.  If you know the name of the function you want to use, just type a URL like this: http://php.net/date and PHP will find the date() function.  Couldn't be easier!  And the magic doesn't end with the official PHP documentation.  Every function page has a section for user-contributed notes.  Often, seeing the way others have used a function (or learned from an unpleasant surprise) will give you great insights into the richness and power of the PHP language.  For example, see this:

使php.net如此有价值的部分原因是函数参考。 在撰写本文时,PHP具有1500多个内置函数。 您不能全部记住它们,因此您需要一种快速的方式来引用它们。 当我编程时,我总是有一个窗口打开php.net 。 如果您知道要使用的函数的名称,只需输入如下网址: http : //php.net/date,PHP就会找到date()函数。 再简单不过了! 魔力还没有结束于官方PHP文档。 每个功能页面都有一个用于用户提供的注释的部分 。 通常,了解其他人使用函数的方式(或从不愉快的惊喜中学到)将使您对PHP语言的丰富性和功能有深刻的了解。 例如,请参见:

http://php.net/manual/en/function.array-slice.php#112359

http://php.net/manual/zh/function.array-slice.php#112359

If you don't know the name of the function you want to use, you can find the function reference table of contents.   Don't plan on reading all of this.  You might want to bookmark it.

如果您不知道要使用的函数的名称,则可以找到函数参考目录 。 不要计划阅读所有这些内容。 您可能要为其添加书签。

The parts of the function reference that you want to read first are probably these:

您首先要阅读的函数参考部分可能是:

Date/Time

约会时间

Database, especially MySQL

数据库 ,尤其是MySQL

File System

文件系统

Strings

弦乐

Arrays

数组

Variables

变数

Sessions

届会

SimpleXML

SimpleXML

JSON

JSON格式

Learning PHP from Books

从书籍中学习PHP

One of the really great things about tech people is that they like tech features, for example, the ability to write book reviews on Amazon.com. If you find a popular and well-reviewed book (and it's not too old) it will probably make a valuable addition to your technical/professional library.  You can't have too many PHP books!  Here are some of the books that I own and recommend.  If you decide to get any of these, be sure to look for the latest editions, because PHP is a living language.

技术人员真正伟大的事情之一就是他们喜欢技术功能,例如能够在Amazon.com上撰写书评。 如果您发现一本受欢迎且受到好评的书(而且还不太老),则可能会对您的技术/专业图书馆有所帮助。 您不能有太多的 PHP书籍! 这是我拥有和推荐的一些书。 如果您决定获得其中的任何一种,请确保寻找最新版本,因为PHP是一种实用的语言。

Beginner: Yank Ignore the hokey title -- it's a good book.

初学者: Yank忽略hokey的标题-这是一本好书。

Beginner to intermediate: Welling/Thompson

初级到中级: Welling / Thompson

Intermediate to Advanced: Powers

中级到高级: 权力

Intermediate to Advanced: Ullman

中级到高级: Ullman

Advanced: Zandstra

进阶: Zandstra

Learning PHP from Online Resources

从在线资源中学习PHP

Most of these resources are 100% free:  Almost anything about PHP from SitePoint is worthwhile.  There are good introductory references at Tizag and W3Schools, however the Tizag PHP web site appears to have gone out of date.  Many of my students swear by CodeAcademy.  And of course there is a Wiki: http://en.wikibooks.org/wiki/PHP_Programming

这些资源大多数都是100%免费的: SitePoint上几乎所有有关PHP的东西都是值得的。 TizagW3Schools都有很好的入门参考,但是Tizag PHP网站似乎已经过时了。 我的许多学生都对CodeAcademy发誓。 当然还有一个Wiki: http : //en.wikibooks.org/wiki/PHP_Programming

New in 2017: Stefan Priebsch curates this site on Software Craftsmanship (advanced)

2017年的新功能: Stefan Priebsch在“软件手Craft.io”上策划了该网站(高级)

https://php-craftsmanship.info/

https://php-craftsmanship.info/

New in 2016: Jeffrey Way brings his considerable teaching skills to a set of PHP courses here:

2016年的新功能: Jeffrey Way将他的大量教学技能带到了以下PHP课程中:

https://laracasts.com/series/php-for-beginners

https://laracasts.com/series/php-for-beginners

While you are mastering the basics of PHP you will have many questions that others have had before you.  This is a worthwhile resource for many of those questions.

在掌握PHP的基础知识时,您会遇到许多其他人遇到的问题。 对于许多这样的问题,这是一个有价值的资源。

https://phpbestpractices.org/

https://phpbestpractices.org/

Once you have mastered the basics of PHP, there is an excellent online resource from the authors of the Slim Framework.

掌握了PHP的基础知识之后,Slim Framework的作者就会提供出色的在线资源。

http://www.phptherightway.com/

http://www.phptherightway.com/

A set of paid courses on PHP is available from lynda.com.  It is not clear to me whether these are up-to-date.

lynda.com提供了一套有关PHP的付费课程。 我不清楚这些是否是最新的。

A set of paid courses on PHP, from active PHP experts, is available from PHP Architect.  The company also publishes books and newsletters, and runs conferences covering PHP topics from the most introductory "bootcamp" to advanced object-oriented design.  If you want to learn from the best in the business, this is the place to come.

可以从PHP Architect中获得活跃PHP专家提供的一组有关PHP的付费课程。 该公司还出版书籍和新闻通讯,并举办涵盖PHP主题的会议,从最入门的“ bootcamp”到高级的面向对象设计。 如果您想向业内的佼佼者学习,这就是您要来的地方。

Learning PHP from "That Guy" -- NOT!

向“那个家伙”学习PHP – 不是!

You've heard the expression, "Don't be that guy."  I'm going to add a recommendation here: "Don't learn PHP from 'That Guy'."  The internet is littered with examples of terrible PHP code.  Mostly it's code from half-taught programmers who don't understand the principles of computer science, don't understand the principles of programming security and don't take the time to clean up after themselves.  It turns up in forums all the time.  It may be untested.  It's almost always undocumented.  And it's something you would use at your own peril.  It's usually worth exactly what you paid for it!  So just say "no" to that stuff and stick to the links published here.  It will save you a lot of grief.

您已经听到过这样的表达:“ 别那么那个人 。” 我将在此处添加一个建议:“不要从“那个家伙”那里学习PHP。” 互联网上到处都是糟糕的 PHP代码示例。 大多数情况下,这些代码来自不懂计算机科学原理,不了解编程安全性原理并且不花时间自己清理的半熟的程序员。 它经常出现在论坛中。 它可能未经测试。 它几乎总是无证的。 这是您自己要承担的风险。 通常,这完全值您所付的价格! 因此,对这些内容说“不”,并坚持此处发布的链接。 它将为您节省很多痛苦。

Summary

摘要

Don't feel awkward or embarrassed if you're new to PHP.  Ignorance is no sin and we were all new to the language once.  Instead, embrace the learning resources documented here, build your own personal library of code examples, post plenty of PHP questions at Experts-Exchange and most importantly give yourself time to work with the language, so that you become familiar with the commonly used parts.  The gift of time and study is one that only you can give yourself, and it may be the most valuable gift of all. And if you're doing it right, learning PHP is fun.

如果您不熟悉PHP,请不要感到尴尬或尴尬。 无知不是罪,我们曾经是该语言的新手。 相反,请使用此处记录的学习资源,建立自己的个人代码示例库, 在Experts-Exchange上发布大量PHP问题,最重要的是给自己时间来使用该语言 ,从而使您熟悉常用的部分。 时间和学习的礼物是只有您才能给自己的礼物,它可能是所有礼物中最有价值的礼物。 而且,如果您做得对,则学习PHP很有趣

Welcome to PHP!

欢迎使用PHP!

Please give us your feedback!

请给我们您的反馈意见!

If you found this article helpful, please click the "thumb's up" button below. Doing so lets the E-E community know what is valuable for E-E members and helps provide direction for future articles.  If you have questions or comments, please add them.  Thanks!

如果您发现本文有帮助,请单击下面的“竖起大拇指”按钮。 这样做可以使EE社区了解对EE成员有价值的内容,并为将来的文章提供指导。 如果您有任何问题或意见,请添加。 谢谢!

翻译自: https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html

php新手项目

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值