A history of the Blood and Tears of PHP--a few small questions that beginners learn about PHP

Source: Internet
Author: User
The history of Blood and Tears in PHP--some problems of beginners learning PHP

The history of blood and Tears in PHP -- Some problems of beginners learning PHP

This semester began to deal with PHP , self-taught PHP for a period of time, with only a few scattered time to learn, progress is not very fast, but this National Day holiday can learn a good, say also strange, Before the words a lot of time do not understand the question, in with the small partners happily play two days, what all understand, perhaps sometimes it is so, some times you want to solve a problem is not to say how many lines of code you knock every day can be solved, you need to empty your head, a change of thinking to solve the problem.

Below I from a small white to play "Hello?world" process, I encountered and resolved the problem:

1. What is the difference between static and dynamic Web pages?

Official explanation version:static Web pages are relative to dynamic Web pages, which means that there are no background databases, no programs, and no interactive Web pages. What you're making up is what it shows and there's no change. Static pages are relatively cumbersome to update, and are suitable for display sites that are less commonly updated. Also , If the extension is . asp But there is no database , completely static page , that is also static web site . just . asp extension. (excerpt from Baidu experience)

know version:before you understand dynamic and static Web pages, first understand the concept of Web servers and clients.
like Sina networkStation, Sohu website, this is the Web server, which stores a lot of various web page files.
you and I use the computer is a client, we use Internet Explorer to log on to the website, download the Web file, after parsing into a colorful look at the page, presented in front of us.

static Web page, generally the simplest HTML Web page, the server side and the client is the same, and there is no script and small program, so it can not move.
Dynamic Web pages include server-side dynamic Web pages and client-side dynamic Web pages.
The so-called server-side Dynamic Web page, refers to the Web page contains on the server running scripts and small programs, Web page before downloading to our computer, the first to run the server on the script and the applet. For example, we enter a user name and password, login to love ask, love ask on the right side can display our user name and points. This is the Dynamic Web page on the server side.
a client-side Dynamic Web page that contains scripts and small programs that are run on a client computer. For example, the Sina homepage will have some small ads flying around, this is the client-side Dynamic Web page.
Simply put: static Web pages who look the same, and can not move; The client-side Dynamic Web page is the same as who see, but active; server-side Dynamic Web page everyone looks different, move.
FrontPage is primarily designed for static web pages, and the ability to design dynamic Web pages is weak.

My own understanding: Dynamic Web Design database and logic, but static web pages do not involve, static pages can be used to design the page, and then embed the PHP code therein, so, the equivalent of HTML is used.

2. Why is PHP called a scripting language and what is a scripting language?

Baidu knows:scripting languagegenerally used to write some simple applications, such as JS,VBS,JSP,ASP, PHP , etc., Macro Programcan also be consideredscripting language. scripting languagethanProgramming LanguagesThe biggest drawback is inefficient execution, but it's easier to write.
HTML is not a language , although it is calledHypertext Markup Language, actually can only be counted as some control mark, write out also is not called program.
static Web pagecan also have VBS or JS script, they are only the foreground.
ASP can either use vbs or JS, but usually most people with VBS , they are backstage.
PHP and C syntax are almost the same, and JS is almost the same, are very close to
you want to do the website to learn ASP(a little behind, but easy to get started) or PHP or JSP or asp . can learn vb.net can also learn c#.net) at least the same.
Free full station system can be used for free modification, but most do not allow commercial use, you can go to the appropriate official website to view the authorization file

3. what compiler to use to write PHP

Many compilers, including Notepad, can write PHP Code, here I recommend EPP3(eclipsephp? Studio?3), because before learning The relationship between Java, it is more familiar with the interface when we write a complete code, how to let it test it?

This is the EPP3 Interface:



??

You see the button similar to the play, click on its drop-down menu, find the Run Configuration button to find their own workplace directory



??

(Under the wamp/www/ directory)

4. Wampserver5 Installation

A lot of friends may be like me, on the basis of no contact with static Web pages to learnPHP, somewhat difficult to understand, the first time I wroteHello?worldis written in Notepad, and then the file suffix name is. txtChange into. PHPbut it is the code, not the thing, that opens, becausePHPis to do the site backstage, must be opened through the server, we have to configure our own computer as a server, or directly to download a one-click Configuration Server, where I recommendWampserver5, download the good installation after successful inD:\wampfolders can be seen in the directory:www, this is the folder where the program places our web pages by default, of course, these paths can be modified by themselves. After writing a simple program with Notepad, modify the suffix name and copy it to the directory, openIEBrowser, inputhttp://localhost/(file name. PHP(If you have subfolders, you can always find the file according to the path of the file), you will see the results we want.

After solving these problems, basically you take the first step into the PHP world. On the way of self-study, we all come together!

  • Related Article

    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.