Php programmer interview questions (Sina)

Source: Internet
Author: User
Php programmer interview questions (Sina)
This article introduces a php programmer interview question from Sina. if you have any questions, refer to it.

1. write a function, as efficient as possible, to retrieve the file extension from a standard url such as: http://www.sina.com.cn/abc/de/fg.php? Id = 1 need to retrieve php or. php

2. in HTML, the meta tag in the page header can be used to output the file encoding format. The following is a standard meta statement. Please use PHP to write a function and change the charset score in a standard HTML page similar to the meta tag to big5. note: (1) you need to process the complete html page, that is, not only does this meta statement (2) ignore case sensitivity (3) 'and "here are interchangeable (4) quotation marks on both sides of 'content-type' can be ignored, however, 'text/html; charset = gbk' cannot be used on both sides. (5) handle extra spaces.

3. write a function to calculate the relative path of the two files, for example, $ a = '/a/B/c/d/e. php '; $ B ='/a/B/12/34/c. php '; calculates the relative path of $ B relative to $ .. /.. /c/d add ()

4. write a function to traverse all files and subfolders in a folder.

5. briefly describe the implementation principles of unlimited classification in the forum.

6. design a webpage so that a full screen window is displayed when it is opened, which contains a text box and a button. After entering information in the text box, you can click the button to close the window. the entered information is displayed on the main page.

1. write a function to retrieve the file extension from a standard url as efficiently as possible.

2. for example: http://www.sina.com.cn/abc/de/fg.php? Id = 1 need to retrieve php or. php

3. intercept and regular expressions are acceptable. where is this string of high performance reflected? (Question 2)

5.2. in HTML, the meta tag in the page header can be used to output the file encoding format. The following is a standard meta statement.

6.

7. use the PHP language to write a function and change the charset score in a standard HTML page similar to the meta tag to big5.

8. note:

9. (1) you need to process the complete html page, that is, not only this meta statement

10. (2) case insensitive

11. (3) 'and "here are interchangeable

12. (4) the quotation marks on both sides of 'content-type' can be ignored, but the quotation marks on both sides of 'text/html; charset = gbk' cannot.

13. (5) handle extra spaces

14. Both character processing and regular expressions are acceptable. what does 1 mean? Are you afraid that you can handle this sentence? The topic probably wants to test the regular expression. in actual application, it is best to add the regular expression and character processing, because there are too many abnormal meta statements. (From the question point of view, there are not many people playing with the question, so the question is 2)

16.3. write a function to calculate the relative paths of the two files

17. for example, $ a = '/a/B/c/d/e. php'; 18. $ B ='/a/B/12/34/c. php ';

19. calculate the relative path of $ B relative to $ a./c/d to add ().

20. solve explode, but I don't understand what the specific practice is?

21. 22. 4. write a function to traverse all files and subfolders in a folder.

23. recursion, familiarity with functions, and meaningless questions (Question 2)

24. 25. 5. briefly describe the implementation principles of unlimited classification in the forum.

26. I forgot to go online. is Sina a forum? Is discuz popular in Sina forums? 27. 28. 6. design a webpage so that a full screen window is displayed when it is opened, which contains a text box and a button. After entering information in the text box, you can click the button to close the window, but the entered information is displayed on the main page.

29. I don't know, but you can refer to some pop-up calendar. click the pop-up calendar window, select the date, close the window, and enter the date in the specified box. What is Sina's willingness to input? (Question 2)

That's all. Questions About php. The writing is a bit messy. you will refer to it for your understanding of the problem ideas and implementation methods for future use,

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.