PHP _php tutorial on face test set

Source: Internet
Author: User
Interview Question 1
1. The time format of the day before printing with PHP is 2006-5-10 22:21:21
2, Echo (), print (), Print_r () difference
3, the ability to make HTML and PHP separated from the use of the template
4, how to implement PHP, JSP interaction?
5. What tools are used for version control?
6, how to implement string rollover?
7, optimize the MySQL database method.
8. Talk about transaction processing
9, apache+mysql+php to achieve maximum load 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? If you have the name of the version control software you are using?






5. Have you ever used a template engine? If you have the name of the template engine you are using?




6. Please briefly describe your most proud development.



7. What are the methods you use to solve traffic problems for large-volume websites?





8. Write the code that displays the 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 of title article
Content article contents
CATEGORY_ID article Category ID
Hits Click Volume

Create the table above and write out the MySQL statement

2) Same as above Content Management system: Table comment Record user reply content, fields 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 sorted, reply to the highest ranked in the front

Article ID article title click Reply Quantity



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


3) The above Content management system, table category to save the classification information, the fields are as follows

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

When a user enters an article, select the article category by selecting the drop-down menu

Write how to implement this drop-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 the realization basic idea

2) Simple description of User modification to publish content 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 questions
1. Please indicate the difference between the value of the transfer and the reference in PHP. When is the value passed?
2. What is the function of error_reporting in PHP?
3. Please write a function to verify that the e-mail message is properly formatted
4. Describe 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 is probably that get is a 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 lifetime 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 that stores the shaping data, write a function that arranges them in order from large to small. Requires high efficiency of execution. and explain how to improve the efficiency of execution. (The function must be implemented by itself and cannot use PHP functions)
8. Please give an example of how you can speed up the loading of pages in your development process.


Two. Database design questions:
Please design a library Management system database table structure, you can record basic user information, book information, borrowing and returning information; the number of data tables is not more than 6; Please draw a table description table structure (need to describe the field name of each field, field type, field meaning description);

In the database design, you should:
1. Ensure the uniqueness of each user;
2. To ensure the uniqueness of each book; Each book corresponds to a number of books that are not equal to each book; guarantee the uniqueness of each book;
3. In the Library information table, the borrowing behavior and the book book should be considered, and the borrowing period should be considered.
4. Ensure the reference integrity between the Library information table and the user table and the book information table;
5. Limit the maximum number of books that can be borrowed per user
6. Guaranteed to automatically generate unique identities if new users register or book storage
7. Support for the following series of reporting requirements:
(without specific instructions, you do not need to write implementation statements, but in the database design, ensure that these reports can be implemented with up to one SQL statement)
A) Daily statistical report: the same day the number of books, the same day the number of books report;
b) Real-time reporting:
I. The number of loans and the number of loans available for each of the current books;
Ii. List of all overdue books and users in the current system and their extended days
III. The number of books borrowed by all users in the current system, listed by users (including those who do not have a borrowing behavior); write the SQL statement that implements this requirement:

Database application:
Write a series of SQL statements describing the complete library behavior and the book return behavior, and ensure that 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 results of the evaluation! So please write a detailed answer and ensure that the answer is a program that can be executed. Send results by e-mail to hr@88keke.com email within two days

In combination with your design in the second question, a database implementation requires the use of a three-layer structure or a multilayer structure, which requires object-oriented thinking to be programmed and, if possible, a set of template mechanisms to implement.

Features: Lists the current loan books, sorted by date

Numbered User name Title Book Number Loan date
1. Zhang Jin da dyeing workshop 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 (not including the path and query string) is recorded in the predefined variable (1), while the URL linked to the current page is recorded in the predefined variable (2).

2. Execution of program segments The output (3).

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

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

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


6. Write a regular expression that js/vbs all the scripts on the Web page (that is, remove the script tag and its contents): (9).

7. Install PHP in the Apache module, in the file http.conf the first to dynamically load the PHP module with the statement (10), and then use the statement (11) so that Apache will all the files with PHP extension as php script processing.


8. Statements include and require can include another file in the current file, the difference is (12), in order to avoid multiple inclusion of the same file, you can use the statement (13) instead of them.

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

10. The argument of 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 Tbl_user records the student's name (name) and school number (ID), Tbl_score records the student (ID) and test score (score) and the test subject (subject), which were expelled from the student's exams, without their records. To print out each student's name and the corresponding total, the SQL statement (17) can be used.

12. In PHP, Heredoc is a special string, and its end flag must be (18).

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

14. Briefly describe the implementation principle of infinite classification in the forum.

15. Design a Web page so that it pops up a full-screen window with a text box and a button. The user clicks the button to close the window while entering the information in the text box, and the input information is displayed on the main page.

Interview Question 6

There is a Table menu (Mainmenu,submenu,url), please use the recursive method to write out a tree-shaped menu, all the menu listed.

Interview question 7

1-give you three numbers, write a program to find its maximum value.
2-Talk about the pros and cons of asp,php,jsp
3-Talk about the understanding of MVC
Write the top 10-digit SQL, using the following table:
Members (Id,username,posts,pass,email)

Interview Question 8
1-How to tell if a window has been masked by JavaScript.
2-Write the session's operating mechanism
3-There is an array $a =array (4,3,8,9,2); Please reorder them, listed in order from small to large.
4-Prevent SQL injection vulnerability generally with the _____ function.
5-Query the number of people online and be able to handle abnormal dropped SQL

http://www.bkjia.com/PHPjc/317116.html www.bkjia.com true http://www.bkjia.com/PHPjc/317116.html techarticle face question 1 1, the time format used to print the day before PHP is 2006-5-1022:21:21 2, Echo (), print (), Print_r () The difference 3, can make HTML and PHP separated from the use of template 4, how to implement PHP 、...

  • 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.