First glance at the history of blood and tears in PHP-several minor issues that Cainiao will encounter when learning PHP

Source: Internet
Author: User
I first got to know the tears of PHP-several problems that beginners will encounter when learning PHP-I first got to know the tears of PHP-several problems that beginners will encounter when learning PHP this semester began to deal with PHP, PHP has been taught by myself for a while. it only takes some scattered time to study and the progress is not very fast. However, this National Day holiday will allow beginners to learn the history of PHP's blood and tears-several problems that will occur when learning PHP.

First understanding of the history of PHP-several problems that beginners will encounter when learning PHP

I started to deal with PHP at the beginning of this semester. I have been studying PHP for a while. I only spent some scattered time learning and the progress is not very fast. but I can study it well during the National Day holiday, it's also strange to say that I have been confused for a lot of time before. After two days of happy games with my friends, I have understood everything. sometimes this is the case, sometimes, if you want to solve a problem, it doesn't mean you can solve the problem by typing a few lines of code every day. you need to clear your head and solve the problem in another way.

Next, I will call "Hello? The problems I encountered and solved during the world process:

1. what is the difference between a static webpage and a dynamic webpage?

Official Version: static web pages refer to webpages without background databases, programs, and non-interactions compared with dynamic web pages. What you compile is what it shows and there will be no changes. Static web pages are relatively difficult to update and are suitable for display websites with fewer updates. In addition, if the extension is. asp but the database is not connected, it is a static page, it is also a static website. it is just a. asp extension. (From Baidu Experience)

Understanding: before understanding dynamic and static web pages, you must first understand the concept of website servers and clients.
Websites like Sina and Sohu are website servers that store a variety of webpage files.
The computer you and I use is a client. We use the IE browser to log on to the website, download the webpage file, and parse it into a colorful and beautiful page, which is displayed in front of us.

Static web pages are generally the simplest HTML web pages. the server side and the client side are the same, and there are no scripts or small programs, so they cannot be moved.
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 scripts and applets that are contained on the server. before a webpage is downloaded to our computer, run the script and applet on the server. For example, if you enter your username and password and log on to ask, your username and points will be displayed on the right. This is the dynamic web page on the server.
A client-side dynamic web page is a script and applet that is contained in the client. For example, there will be some small advertisements on the Sina homepage, which is the dynamic web page on the client side.
To put it simply: static web pages are the same and cannot be moved. dynamic web pages on the client are the same but dynamic. dynamic web pages on the server are different and active.
Frontpage is mainly designed for static web pages, and its ability to design dynamic web pages is weak.

My own understanding: Dynamic web page design databases and logic, but static web pages are not involved. static web pages can be used to design pages and then embed PHP code into them, this is equivalent to HTML.

2. Why is PHP a scripting language?

Baidu knows: the scripting language is generally used to compile some simple applications, such as JS, VBS, JSP, ASP, PHP, etc. the macro program can also be regarded as a script language. Compared with programming languages, the script language has a low execution efficiency but is easier to write.
HTML is not a language. although it is called a hypertext markup language, it can only be regarded as some control markup, and it is not written as a program.
Static web pages can also contain VBS or JS scripts, which are only on the front-end.
In ASP, you can use VBS or JS, but most people use VBS. they are in the background.
PHP and C have almost the same syntax. In fact, they are almost the same as JS, and they are very similar.
You have to learn ASP (a little behind, but it is easier to get started) or PHP, JSP, or ASP.net (you can learn VB.net or C #. net) at least.
The free whole-site system can be modified for free, but most of them are not allowed for commercial use. you can view the authorization files on the corresponding official website.

3. what kind of compiler is used to compile PHP?

Many compilers, including Notepad, can write PHP code. here I recommend EPP3 (EclipsePHP? Studio? 3) because I have learned the java relationship before, I am familiar with this interface. how can I test it after we write a complete piece of code?

This is the EPP3 interface:



??

You can see the playback key-like button. click the drop-down menu, find the running configuration button, and find your workplace directory.



??

(In the wamp/www/directory)

4. Wampserver5 installation

Like me, many of my friends may learn PHP based on their lack of access to static web pages. it is more or less difficult to understand. the first time I wrote Hello? Worldis compiled with a notepad, and then the filename is changed from .txt. php is actually code rather than what you want to do after opening it. The reason is that PHP is a website background and must be opened through a server. we must configure our own computer as a server, or directly download a one-click configuration server. here I recommend Wampserver5. after the installation is successful, you can see the folder www in the D: \ wamp directory, this is the folder where the program places our webpage by default. of course, these paths can be modified by yourself. Write a simple program in Notepad, modify the suffix and copy it to the directory. open IE and enter http: // localhost/(file name. php (if there is a subfolder, it will always find the file based on the path of the file), you can see the desired results.

After solving these problems, you have taken the first step into the PHP world. On the road to self-study, let's work together ~

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.