PHP's face test set _php Digest

Source: Internet
Author: User
Tags php file php and php script regular expression script tag sql injection string format
Interview Question 1
1, use PHP to print out the day before the format is 2006-5-10 22:21:21
2, Echo (), print (), Print_r () difference
3, can make HTML and PHP separated from the use of templates
4, how to implement PHP, JSP interaction?
5. What tools are used for version control?
6, how to implement string flip?
7, optimize the MySQL database method.
8. Talking about transaction processing
9, apache+mysql+php to achieve the maximum load of the method
10, the implementation of the text string interception without garbled method.

Interview Question 2
var $empty = ';
var $null = null;
var $bool = FALSE;
var $notSet;
var $array = array ();
1.
$a = "Hello";
$b = & $a;
Unset ($b);
$b = "World";
What is $a?

2.
$a = 1;
$x = & $a;
$b = $a + +;
What is $b?


3.
$x = Empty ($array);
What is $x? True or False


4. Have you ever used version control software? What is the name of the version control software you are using?






5. Have you ever used a template engine? What if you have the name of the template engine you're using?




6. Please give a brief description of your most proud development.



7. What methods do you use to address traffic problems for large traffic sites?





8. Write the code to display client IP and server IP in PHP:


Interview Question 3
First, Php/mysql programming

1 in a Content management system, the table message has the following fields
ID Article ID
Title article titles
Content article contents
CATEGORY_ID article Category ID
Hits Click Amount

Create the above table, write the MySQL statement

2 the same Content Management system: Table comment Record user reply content, the field is as follows
comment_id Reply ID
ID article ID, ID in the associated message table
Comment_content Reply Content

Now by querying the database need to get the following format of the article title list, and according to the number of replies, the highest back in the first line

Article ID article title Click Quantity Reply Quantity



Complete the above query with an SQL statement, and if the article does not reply, the number of responses is shown as 0


3 The above Content management system, the table category saves the classification information, the field is as follows

category_id Int (4) not NULL auto_increment;
Categroy_name varchar () not NULL;

When the user enters the article, select the article category by selecting the Drop-down menu

Write down how to implement this Pull-down menu


Second, PHP file operation

1)
The above content management system: After the user submits the content, the system generates the static HTML page, writes out realizes the basic idea

2) Simple description of user changes to publish the content of the implementation process and basic ideas


Third, PHP program

1) write out the output of the following program
?

$b = 201;

$c = 40;

$a = $b > $c 4:5;

echo $a;

?>


2) write out the output of the following program

?

$STR = "CD";

$ $str = "Hotdog";

$ $str. = "OK";

Echo $CD;

?>


Interview Question 4
I. Brief answer
1. Please explain the difference between the value in PHP and the reference in the pass. When does the value pass the reference?
2. What is the function of error_reporting in PHP?
3. Please write a function to verify that the e-mail message is in the correct format
4. Briefly describes how to get the current execution script path, including the obtained parameters.
Description: For example, there is a script www.domain.com, the parameters passed to him are parameter 1, parameter 2, Parameter 3 ....
The way to pass a parameter might be if get is post, so now write a similar
Http://www.domain.com/script.php? Parameter 1= value 1& parameter 2= value 2 ... The results
5. How to modify the life time of the session.
6. Have a webpage address http://www.domain.com/xxx.php, how to get its content?
7. There is a one-dimensional array, which stores the shaping data, please write a function that will be in the order from large to small. Requires high execution efficiency. and explain how to improve execution efficiency. (This function must be implemented by itself and cannot be used with PHP functions)
8. Please provide examples of how you can speed up the loading of your pages during your development process.


Two. Database design questions:
Please design a library Management system database table structure, you can record the basic user information, book information, borrow books information, the number of data table does not exceed 6; Please draw a table description table structure (you need to describe the field name, field type, description of the field meaning of each field);

In the database design, you should:
1. Ensure the uniqueness of each user;
2. Guarantee the uniqueness of each book; Each book corresponds to a number of books that are not equal to the amount of the book, to ensure the uniqueness of each book;
3. In the Library information table, we should consider the library behavior and the book return behavior at the same time, consider the loan period;
4. Guarantee the referential integrity between the library information table and the user table and the book information table;
5. Limit the maximum number of books per user can borrow
6. If a new user registration or book warehousing, to ensure the automatic generation of its unique identity
7. Support for the following list of reporting requirements:
(No specific instructions, no need to write implementation statements, but in the database design, to ensure that these reports can be implemented with up to one SQL statement)
(a) Daily statistics report: The number of books on the day, the number of books on the day report;
b) Live reports:
I. The current number of loans for each type of book, the number of which can be borrowed;
Ii. List of all overdue books and users in the current system and their extended days
(iii) The current number of books borrowed by all users in the system, listed by users (including those who do not have a library); Write the SQL statement that implements this requirement:

Database application:
Write a series of SQL statements describing the complete library behavior and book return behavior, and ensure the execution integrity of this series of SQL statements
The next question is the most important test ability, if not completed we will not be able to give the evaluation results! So write a detailed answer and make sure that the answer is a program that can be executed. Mail the results in two days to hr@88keke.com Mail

Combined with the second question in your design, with a database implementation, requires the use of three-tier structure or multi-layer structure, requires the adoption of object-oriented ideas for programming, if possible, design a set of template mechanism to achieve it.

Functions: Lists the current loan books, sorted by date

Numbered User name Title Book Number Loan date
1. Zhang Jin da fang 12576587 2004-9-1
2. Liu Xing Journey to the 32131098 2004-9-2
......


Interview Question 5
1. In PHP, the name of the current script (excluding the path and query string) is recorded in a predefined variable (1), while the URL linked to the current page is recorded in a predefined variable (2).

2. The execution segment <?php echo 8% ( -3)?> outputs (3).

3. In HTTP 1.0, the meaning of status code 401 is (4), and if you return a "file not found" prompt, the header function is available and the statement is (5).

4. The function of the array function is Arsort (6), and the function of the statement error_reporting (2047) is (7).

The database connection string format in 5.PEAR is (8).


6. Write a regular expression, worry about all the Js/vbs script on the page (that is, the script tag and its contents are removed): (9).

7. The Apache module installation of PHP, in the file http.conf first to use the statement (10) Dynamically loaded PHP module, and then use the statement (11) so that all extensions of the PHP file name to the SQL PHP script processing.


8. Statement include and require can include another file in the current file, the difference being (12); To avoid including the same file multiple times, you can replace them with statements (13).

9. The properties of a class can be serialized and saved into session so that the entire class can be recovered later, and the function to be used is (14).

10. An argument to a function cannot be a reference to a variable unless (15) is set to on in PHP.ini.

The meaning of the left join in 11.SQL is (16). If the Tbl_user records the student's name and number (ID), Tbl_score records the student (ID) and the exam results (score) and the examination subjects (subject) of the students (some of whom have been expelled after the test), To print out each student's name and corresponding section score, you can use the SQL statement (17).

12. In PHP, Heredoc is a special string whose ending flag must be (18).

13. Write a function that can traverse all files and subfolders under a folder.

14. Describe the implementation principle of infinite classification in the forum.

15. Design a Web page that opens a Full-screen window with a text box and a button. When the user enters the information in the text box and clicks the button, it closes the window and the information is displayed on the main page.

Interview Question 6

There is a Table menu (Mainmenu,submenu,url), write a tree menu with recursion, and list all the menu.

Interview question 7

1-Give you three number, write the program to find its maximum value.
2-Talk about the pros and cons of asp,php,jsp
3-talking about the knowledge of MVC
The 10-person name of the most-written SQL, using the following table:
Members (Id,username,posts,pass,email)

Interview Question 8
1-How to determine if a window has been blocked by JavaScript.
2-Write down the operating mechanism of the session
3-There is an array of $a =array (4,3,8,9,2); Please reorder them, listed in order from small to large.
4-Prevent SQL injection vulnerabilities generally use the _____ function.
5-Query the number of online, and can handle abnormal drop of SQL

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.