Php users may encounter the following problems when looking for a job. php users may encounter the following problems when looking for a job.
1. use PHP to print the time format of the previous day in the format of 22:21:21 (2 points)
2. differences between echo (), print (), and print_r () (3 points)
3. templates that can separate HTML and PHP (1 point)
4. what tools are used for version control? (1 point)
5. how to implement string flip? (3 points)
---------------------------------------------------------------
6. optimize the MYSQL database. (4 points, more writes)
7. PHP meaning (1 minute)
8. what is the function for MYSQL to obtain the current time ?, The format function is (2 points)
9. the method of intercepting Chinese strings without garbled characters is implemented. (3 points)
---------------------------------------------------------------
10. have you used version control software? What is the name of the version control software you use? (1 point)
11. have you used the template engine? What is the name of the template engine that you use? (1 point)
12. Briefly describe your most proud development work (4 points)
13. What methods do you use to solve the traffic issue for high-traffic websites? (4 points)
-----------------------------------------------------------------
14. use PHP to write the code for displaying the client IP address and server IP Address: 1 point)
15. what is the difference between the include statement and require statement? To avoid multiple accesses to the same file (?) Statement instead of them? (2 points)
16. how to modify the SESSION survival time (1 point ).
17. there is a webpage address, such as the PHP Research Home Page: #. how can I get its content? ($1)
18. in HTTP 1.0, status code 401 indicates (?); If the message "File Not Found" is returned, the header function is available. The statement is (?); (2 points)
19. in PHP, heredoc is a special string and its end mark must be? (1 point)
20. Advantages and disadvantages of asp, php, and jsp (1 point)
21. about mvc (1 point)
-------------------------------------------------------------------
22. write the SQL statement for the top 10 people with the most posts. use the following table: members (id, username, posts, pass, email) (2 points)
23. The difference between passing a value in php and transferring a reference. When will the value be passed for reference? (2 points)
24. what is the role of error_reporting in PHP? (1 point)
25. please write a function to verify that the email format is correct (2 points)
26. briefly describe how to obtain the path of the script to be executed, including the obtained parameters. (2 points)
27. how to modify the SESSION survival time (1 point)
--------------------------------------------------------------------
28. what is the function in the JS form pop-up dialog box? What is the input focus function? (2 points)
29. what is the JS steering function? How to introduce an external JS file? (2 points)
30. what is the difference between foo () and @ foo? (1 point)
31. how to declare a class named "myclass" without methods and attributes? (1 point)
32. how to instantiate an object named "myclass? (1 point)
33. how do you access and set attributes of a class? (2 points)
34. what is the difference between mysql_fetch_row () and mysql_fetch_array? (1 point)
--------------------------------------------------------------------
35. what is the GD library used? (1 point)
36. point out some methods to input a piece of HTML code in PHP. (1 point)
37. Which of the following functions can open a file to read and write the file? (1 point)
(A) fget () (B) file_open () (c) fopen () (d) open_file ()
38. Which of the following options does not add john to the users array? (1 point)
(A) $ users [] = 'John ';
(B) array_add ($ users, 'John ');
(C) array_push ($ users, 'John ');
(D) $ users | = 'John ';
39. Will the following program enter? (1 point)
$ Num = 10;
Function multiply (){
$ Num = $ num * 10;
}
Multiply ();
Echo $ num;
?>
40. use php to write a simple query, find all the content named "zhang san" and print it out (2 points)
Table name UserName Tel Content Date
Zhang San 13333663366 graduated from college-10-11
Michael Zhang graduated from 13612312331 undergraduate course-10-15
Zhang Si 021-55665566 graduated from technical secondary school 2006-10-15
Complete the code according to the above question:
$ Mysql_db = mysql_connect ("local", "root", "pass ");
@ Mysql_select_db ("DB", $ mysql_db );
41. how to use the following classes and explain what the following means? (3)
Class test {
Function Get_test ($ num ){
$ Num = md5 (md5 ($ num). "En ");
Return $ num;
}
}
----------------------------------------------------------------------------
42. format of writing SQL statements: insert, update, and delete (4 points)
Table name UserName Tel Content Date
Zhang San 13333663366 graduated from college-10-11
Michael Zhang graduated from 13612312331 undergraduate course-10-15
Zhang Si 021-55665566 graduated from technical secondary school 2006-10-15
(A) there is a new record (Mr. Wang graduated from high school 13254748547-). please use SQL statements to add it to the table.
(B) use SQL statements to update Michael's time to the current system time.
(C) please write out all records named zhangsi.
43. enter the meaning of the data type (int char varchar datetime text). What is the difference between varchar and char (2 points)
44. the MySQ auto-increment type (usually the table ID field) must be set (?) Field (1 point)
45. write the output results of the following program (1 point)
$ B = 201;
$ C = 40;
$ A = $ B> $ c? 4: 5;
Echo $;
?>
46. check whether a variable has a set function? Is it a null function? (2 points)
-----------------------------------------------------------------------------
47. what is the function used to obtain the total number of query result sets? (1 point)
48. $ arr = array ('James ', 'Tom', 'symfony '); print the value of the first element (1 point)
49. use the ',' to separate the array values of question 41 and combine them into strings for output (1 point)
50, $ a = 'abcdef '; please take out the value of $ a and print the first letter (1 point)
51. can PHP be connected to databases such as SQL server and oracle? (1 point)
52. write the PHP5 permission control modifier (3 points)
53. write the php5 constructor and Destructor (2 points)
------------------------------------------------------------------------------
54. use PHPMYADMIN to complete the following steps:
(1) create a news publishing system. The Table named "message" has the following fields (3 points)
Id article id
Title article title
Content
Category_id document Category id
Hits clicks
(2) Similarly, the above-mentioned news publishing system: the table comment records the user's reply content. The fields are as follows (4 points)
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 preceding content management system, the table category stores the category information. The fields are as follows (3 points)
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
Blank question
1. in PHP, the name of the current script (excluding the path and query string) is recorded in the predefined variable ____, and the URL linked to the current page is recorded in the predefined variable.
2. the execution program segment will output ____.
3. in HTTP 1.0, status code 401 indicates ____. if the "File Not Found" prompt is returned, the header function is available, and its statement is ____.
4. The role of the array function arsort is ____; the role of the error_reporting (2047) statement is ____.
5. the format of the database connection string in PEAR is ____.
6. write a regular expression and overwrite all JS/VBS scripts on the webpage (that is, remove the scr ī pt mark and its content ):____.
7. install PHP using the Apache module in the http. in conf, we first need to use the statement ____ to dynamically load the PHP module, and then use the statement ____ to make Apache process all files with the extension php as PHP scripts.
8. the include and require statements can both include another file to the current file. The difference between them is ____. to avoid multiple inclusion of the same file, you can replace them with ____ statements.
9. the attributes of the class can be serialized and saved to the session, so that the entire class can be restored later. the function to be used is ____.
10. a function parameter cannot be a reference to a variable unless ____ is set to on.
11. the meaning of left join in SQL is ____. If tbl_user records the student's name and student ID, tbl_score records the student's student ID (ID) (which is not recorded after some students take the test) to print the name of each student and the total score of each subject, use the SQL statement ____.
12. in PHP, heredoc is a special string whose end mark must be ____.
Programming Questions
1. write a function to retrieve the file extension from a standard url as efficiently as possible.
For example: # you 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.
Use the PHP language to write a function and change the charset part of a standard HTML page similar to meta tag to big5.
Note:
1. you need to process the complete html page, that is, not only this meta statement
2. case insensitive
3. 'and "are interchangeable here
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 be ignored.
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 ';
Calculate the relative path of $ B relative to $ a./../c/d to add ().
3. write a function to traverse all files and subfolders in a folder.
4. briefly describe the implementation principles of unlimited classification in the forum.