The PHP interview questions compiled by NLP should not be relevant if you can find 7/8 K.

Source: Internet
Author: User
Tags php basics
The PHP interview questions compiled by NLP are correct. it should not be a problem to find 78k. someone always asks me for these questions and asks me to answer them... now let's get it done. if you can do it well, we suggest you give the salary between 6 and 9 ...? Should the level be in progress? This is something I have tried to recruit people around 12 years ago. it basically satisfies the needs of the intermediate PHP interview. I wrote the basic PHP knowledge section 1. evaluate the value of $ a $ ahello; $ B & amp; $ a; the PHP interview questions compiled by the unse workshop should not be correct if you can find 7/8 K.

Someone always asks me for this and asks me to answer the question... now let's get it done. if you can do it well, we recommend that you have a salary between 6 and 9...

?

The level should be in progress

?

I have been recruiting people for about 12 years. I basically met the PHP interview for the preliminary and intermediate students.

Write

PHP Basics

1. evaluate the value of $

$ A = "hello ";
$ B = & $;
Unset ($ B );
$ B = "world ";
Echo $;

2. evaluate the value of $ B

$ A = 1;
$ X = & $;
$ B = $ a ++;
Echo $ B;

3. write a function to delete all subdirectories and files under the specified directory.

4. write a function to calculate the relative paths of the two files, such:
$ A = '/a/B/c/d/e. php ';
$ B = '/a/B/12/34/c. php ';


Basic javascript knowledge

1. talk about several methods of js implementation inheritance and write a demo.

2. talk about the js framework you are familiar with and implement DOM element acquisition below





It is required to find drag = "true" and index = "1" or p without the index attribute

Tip: If you cannot write data at a time, complete the following steps.
1. find drag = "true" and index = "1"

2. find the drag = "true" with no index attribute

3. Combine the two to get


3. implement a mask layer effect. the elements to be displayed must be displayed in the center of the page.

4. knowledge of closures

Function step (){
Return function (x ){
Return x + a ++;
}
}

Var a = step (10 );
Var B = step (20 );
Alert (a (10 ));
Alert (B (20 ));
Var a = "123abc ";
Alert (typeof (a ++ ));
Alert ();


MySQL knowledge

1. in a content management system, the table message has the following fields:
Id article id
Title article title
Content
Category_id document Category id
Hits clicks

Create the table above and write MySQL statements

2. Similarly, the preceding content management system: the table comment records the user's reply content. The fields are as follows:
Comment_id reply id
Id document id, associated with the id in the message Table
Comment_content reply content

To query the database, you need to obtain a list of article titles in the following format and sort them by the number of replies.

Article id: number of replies in the document title

Use an SQL statement to complete the above query. if the article does not reply, the number of replies is displayed as 0.


3. in the content management system described above, the table category stores the category information. The fields are as follows:

Category_id int (4) not null auto_increment;
Categroy_name varchar (40) not null;

When you enter an article, select an article category from the drop-down menu.

Write down how to implement this drop-down menu [PHP, JAVASCRIPT, HTML]


Mysql knowledge extensions

4. the system needs to expand the classification table to support unlimited classification. please design the table structure and complete the following scenarios based on your design:

1. search for all articles under the specified category (including all articles under the subcategory)
2. search for the classification of a specified article to the root classification level, for example:
The article "Mysql optimization experience" corresponds to "program design/Mysql/O & M /"
3. when you delete a category, you must delete all its subcategories.


5. the system needs to add the tag function to the article (the relationship between tags and articles is many-to-many) to implement the "Related articles" function. please design this table structure,
Complete the following scenarios based on your design.

1. search for the five articles closest to the specified article (the similarity algorithm uses the number of identical tags as the basis, and the larger the number, the more similar the description)


Comprehensive knowledge:

1. Talk about your understanding of cookies and Sessions. what are their applicable scenarios? if possible, explain how to share sessions in multiple applications.

2. Talk about your understanding of single-point logon, such as the principle and implementation, and what problems need to be paid attention to during the implementation process.

3. let's talk about your understanding of MVC. What are the shortcomings of MVC? how do you implement it if you want to implement an MVC framework?

4. how do you understand and implement permission management that you have used in your daily work?

?

Freezingsky on the first floor 23 hours ago

4. write a function to calculate the relative paths of the two files, such:
$ A = '/a/B/c/d/e. php ';
$ B = '/a/B/12/34/c. php ';

This question also has some meaning, which is equivalent to finding the public largest substring of two strings. However, during the on-site test, it is basically a brute force match.

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.