Introduction to PHP Simple guide

Source: Internet
Author: User
Tags learn php php file ticket

Specifically what day began to contact with PHP, silently this dull brain has not been able to remember, but it should be said that time is not short, although I often is yesterday's thing to forget today.


I used to have a lot of choices when I entered the computer industry. Do software, make design, do the website and so on, analyzed the software, the pirate crack rate is high, therefore did not enter, the analysis makes the design, I did not have received any art knowledge, although the drawing is quite good, but lacks the theory foundation, the total feeling is a bit not suitable, So also did not consider, and finally do the site, although the silent science results are not very excellent, but the perception and logic is relatively strong, and, I also prefer programming, so I chose it.


At that time I only know the HTML, finally a great effort to do a static website, at that time I also foolishly made a landing box on the top, although the point is sure not to jump, but I see so many stations have, I also have to hang a bar, now think, funny after more is depressed.


Then I began to contact the dynamic language, first let me choose the ASP, I looked at the ASP code, feeling a bit awkward, inadvertently saw PHP, looked at, more comfortable, choose it, perhaps some people will suspect that the original silence is really from the code to see shun this simple motives of the choice of PHP? It was true that I had no ability to measure the distinction between them at that time, but at least I believed my choice was correct.


The days of learning PHP, hard and boring, at that time the tutorial less poor, full of mistakes, more miserable is almost every tutorial station articles are stereotyped, sometimes see an incomplete tutorial, looking for a half-day can not find another part, quite depressed, more tragic is that theseInformationAlmost entirely academic, some of the terminology of my half a day back to taste, in the end is what, what is what? At that time also checked whether there is no place to teach, the result is disappointment.


Disappointment to disappointment, difficulties to difficult, silently never give up, even in this world is left me a person to learn PHP, I will not stop learning footsteps, this character is not born, because before I failed too much, now I want to prove himself, have the ability, have the strength, I want to be responsible for my choice, I am also responsible for my own future.


Nonsense said a lot, inevitably have a big say I wordy, then cut to the chase.
What exactly is 1,php, and what can it do for me?
This is the first question mark of a human brain that just meets PHP, if we say like the ASP, then surely they have a second question mark, what is the ASP?


In fact, PHP is a tool, scripting language, what it can do is only a matter of purpose, but it is commonly used to do web sites.
What the scripting language is, this question is not to be considered, because you just know that PHP belongs to the scripting language.


2, learn PHP to pay attention to what?
The so-called attention is actually the trick, learn PHP can say no tricks, also can say has the knack, because each person's thought pattern has the difference, some things have the very big difference in the understanding, in my understanding one thing, in other people's idea is different, therefore, when receives other people to this thing description, The first thing to translate into your own understanding model is that in PHP, the only thing you need to know is persistence, which is the only common thread, and none of them works better than that.


3, how to start learning php?
PHP is not an independent environment, it is dependent on a Web site operating environment, currently commonly used apache+php combination, IIS can also, on how to build PHP environment, in search engines you will find the answer.
Setting up a good environment is a prerequisite, and after that, you will begin to learn its grammatical structure and considerations.


4, learn what programming language after learning PHP to help?
PHP is a kind of c/s + + language, so it is helpful to learn from C + + before, but can not be copied directly.


What does the 5,php file open with? Why can't I find a php file to open?
PHP file is a text format, the use of any text editor can easily open, in Windows Notepad Notepad or Linux under the Vim can be directly opened.


6, do you have to use Linux to learn PHP?
PHP has a version of Windows and UNIX, so you can learn PHP well in Windows and Linux, you have to learn a new operating system with Linux, you can choose to use it or not, but it is recommended that you use Linux silently.


7, my English is not good, is not learn php well?
The syntax of PHP is all simple English, in fact, very good understanding, as for information documents, there are quite a number of excellent documents have been translated, so when learning PHP do not care about their English level, but English is an important subject, silently recommend you in the process of learning PHP to improve their English level , which will play a very important role in the future of the road.


8, how I heard of asp/jsp/. NET is much stronger than PHP?
Everyone has an attitude of understanding things, like silently, I was simply looking at the code is not pleasing to the eye on the choice of PHP, which does not care about the attitude of others, sometimes, believe that they are more useful than anyone, I mean, you can not believe silently, everything depends on their own choice, but have to remember, Choose to learn after all, no matter how difficult.


9. Where can I get the latest information about PHP?
PHP Official station is your choice, of course, the premise is English is good, in addition phpchina.cn is also a very nice place, you now come? If you see this article is not in the phpchian.cn, look at it is not bad, there are many places to go, in short, now learning PHP is easier than before, you will never feel lonely.


10, is not finished learning PHP can make a good site?
PHP is a factor to do the site, to make a beautiful website, html+javascript+css+php+mysql+ ... Can, however, your current task is to learn PHP first, one by one, not by my list of the long string of elements, in fact, they are very simple.


Used to be my personal understanding of some of the things PHP, only the novice to play a role in prompting, the effect is not guaranteed, but also not authoritative, we refer to it.
1,&lt: What is?>? Why must I write it?
?> is a delimiter, or called a declaration, mainly in the beginning and end of the PHP code, said that the popular point is the national boundaries, it is all the people of PHP, in addition to this statement there are <?php?> <script language=php ></script> and so on. As long as it is outside of the PHP tube is not belong to.


2, what is a variable? What are constants?
Popular point, the variable is a room, who can go there to eat, and then find the person to eat, directly say the name of the room can be found, played a role in metonymy.
Constant is a room under the package, the person inside is fixed, generally will not change.


3, what is the data type?
Data type is a kind of classification, such as fruit, there are bananas, oranges, but they are fruit.


4,functionWhat is it?
The function is like an ice cream machine, you can press the ice cream directly, it gives out an ordinary ice cream, you can also say what color, you can also specify what shape, you can also say what to Sheng, ice cream machine is almost omnipotent, but after the things in the building, you don't care what it is constructed, As soon as you press the button, it executes the function directly.


5, what is Process control?
For example, met the police on the road, he saw you are riding the bike, let you go non-motor road, this is if judge, behind you if the person is driving, the police let him go to the motorway.
Or there is a police on the road, it is the city has occurred a major event, to check the car, you will find him a check, if there has been no criminals, they will check to the everlasting (that will be our police Uncle exhausted ...). If the offender is checked, they stop immediately, and this is the while loop.
Today is not the road, to the cinema, ha, what movie? Secret, you bought the ticket, took the ticket to the ticket clerk there, the ticket inspector looked at your tickets, you are number 8th, so you went to number 8th there, this belongs to the select process.
Today you really miserable, you are late, or the PE teacher's class, wow, your teacher a little face don't give you, let you go to run 10 times the playground. Tired of it. This is called A For loop.


6, what is the class?
For example, you made a human-made class, what could this class do? First, you specify that the person's hair is black, the skin is white, the eyes are white, the mouth is red, the tongue is long, wow, ghosts ah! Then you can let the person you designate, head up, foot up, grab the ear, scratch the cheek,-_-the monkey.
The human structure is not known to others, and does not need to know, as long as you know how to use the line.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.