Supplementary questions Knowledge

Source: Internet
Author: User
Tags mysql query

1.PHP (Foreign name: Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") is a common open source scripting language.

The difference between 2.echo,print and Print_r:

Both Echo and print can be output, except that echo is not a function, there is no return value, and print is a function with a return value, so relative to the output echo is faster, and print_r is often used to print information about variables, usually in debugging.
Print is a printed string
Print_r is the print composite type Array Object
The difference between 3.require and include:
Require a file in error, then the program will be interrupted execution, and display a fatal error;
Include a file if there is an error, then the program will not be the middle end, but continue to execute, and display a warning error;
4.
The difference between Sort,asort and Ksort:

Sort based only on values from small to large, key values do not participate in sorting

Asort Sort by value, key value participates in sort

Ksort sorted by key value, value participates in sort

5.the difference between session and Cookie:

  The cookie data is stored on the client's browser and the session data is placed on the server;

Cookies are not very secure, and others can analyze cookies stored locally and make cookie spoofing
Consider that the session should be used for safety;

The session will be saved on the server for a certain amount of time. When access is increased, it will be more likely to occupy your server's performance
In view of mitigating server performance, cookies should be used;

A single cookie cannot hold more than 4K of data, and many browsers limit a maximum of 20 cookies per site;

Recommendation: The login information and other important information stored as a session, other information if necessary to retain, can be placed in a cookie.

[email protected] The meaning of the symbol:
@ Represents the statement after the @ symbol if there is an error will be ignored, will not prompt, because PHP runtime will be some errors, some reminders of the error, if you use @ then this statement has errors will not be prompted
7. Common Status Codes
   -Server successfully returned to Web page
  404 – The requested page does not exist
  503 – The server is temporarily unavailable
-Server Internal Error
  • 401 -not authorized
The difference between 8.xhtml and HTML
 XHTML is HTML like XML, a transitional language, it is higher than the rigor of HTML, and then the basic language is still the use of HTML tags, but the abolition of some of the performance layer of the label, colleagues in the standard requirements of high points such as the strict nesting of tags, label end and so on
9. Destructors and Constructors:
One is called when an object is created, and one is called when the object is destroyed.
10. How to optimize MySQL database:
Create indexes, composite indexes, indexes that do not contain columns with null values, use short indexes, sorted index problems, like statement operations, do not perform operations on columns, do not use not in and <> operations, optimize your MySQL query cache, Use limit 1 to get unique rows, use explain to make your select query clearer, ensure that the index of the connection is the same type, do not use the by RAND () command, try to avoid the SELECT * command, Get recommendations from procedure analyse (), store IP addresses as unsigned integers, Use a connection (join) instead of a subquery.
The difference between 11.char, varchar and nvarchar
   Char is fixed-length;
   nvarchar (n): A variable-length Unicode character data containing n characters;
varchar:
variable-length, non-Unicode character data with a length of n bytes.
12. The three paradigms of the construction of the table:
The first paradigm (1NF) requires that the information be atomic, and that the information is not re-divided.
The second paradigm (2NF) requires that the data conform to the criteria of the first paradigm, and the data elements are organized into groups, eliminating redundant data. Each group contains a primary key and non-critical data, and non-critical data must be functionally dependent on the primary key.
The third paradigm (3NF) requires that data elements conform to the criteria of the second paradigm, while non-critical data cannot contain dependencies.



Supplementary questions Knowledge

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.