Messy PHP basic interview questions

Source: Internet
Author: User

Basic Questions <br/> 1. What are the differences between get and post submission methods in the form? <Br/> A: After the get client adds data to the URL, the format is "? Field 1 = input data 1 & Field 2 = input data 2 &...". <Br/> a serious security problem occurs because the parameters submitted by get are displayed in the address bar. <Br/> the size of get transmission is small, and the size of get transmission is small. This is mainly because the URL length is limited, while post can transmit a large amount of data. <Br/> Get restricts the range of datasets in the form to asc2 code, while post supports the entire iso000046 character set. <Br/> 2. What is the difference between session and cookie? <Br/> A: the cookie mechanism adopts the client-side persistence scheme, while the session mechanism adopts the server-side persistence scheme. <Br/> 3. What is the transaction in the database? <Br/> A: a transaction is a series of operations that complete a task. As long as one of these operations fails, the transaction fails and a rollback event occurs. That is, cancel the previous operation to ensure data consistency. In addition, you can temporarily store the operation in the cache and wait until all operations are successfully submitted to the database. This ensures that time-consuming operations are effective operations. <Br/> summary question (50 points) <br/> 1. Use PHP to print the time format of the previous day in the format of 22:21:21 (2 points) <br/> 2. Differences between echo (), print (), and print_r () (3 points) <br/> 3. templates that can be used to separate HTML and PHP (1 point) <br/> 5. Which tools are used for version control? (1 point) <br/> 6. How to Implement string flip? (3 points) <br/> ------------------------------------------------------------- <br/> 7. Optimize the MySQL database. (4 points, more writes) <br/> 8. php means (1 point) <br/> 9. What is the function for MySQL to get the current time ?, The date format function is (2 points) <br/> 10. The Chinese string is intercepted without garbled characters. (3 points) <br/> 11. Have you used version control software? What is the name of the version control software you use? (1 point) <br/> 12. Have you used the template engine? What is the name of the template engine that you use? (1 point) <br/> 13. Briefly describe your most proud development work (4 points) <br/> 14. For websites with high traffic volumes, what method do you use to solve the traffic issue? (4 points) <br/> --------------------------------------------------------------- <br/> 15. Use PHP to write the code showing the Client IP address and Server IP Address: 1 point) <br/> 16. 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) <br/> 17. How do I modify the session survival time (1 point)? <br/> 18. I have a webpage address, such as the php development resources home page: http://www.phpres.com/index.html. How can I find the desired content? ($1) <br/> 19. 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) <br/> 12. In PHP, heredoc is a special string and its end mark must be? (1 point) <br/> 13. Advantages and Disadvantages of ASP, PHP, and JSP (1 point) <br/> 14. About MVC (1 point) <br/> tips <br/> 15. 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) <br/> 16. note the difference between passing a value in PHP and passing a reference. When will the value be passed for reference? (2 points) <br/> 17. What is the role of error_reporting in PHP? (1 point) <br/> 18. please write a function to verify that the email format is correct (2 points) <br/> 19. this section describes how to obtain the path of the currently executed script, including the obtained parameters. (2 points) <br/> 20. How to modify the session survival time. (1 point) <br/> -------------------------------------------------------------- <br/> 21. The function of the JS form pop-up? What is the input focus function? (2 points) <br/> 22. What is the JS steering function? How to introduce an external JS file? (2 points) <br/> 23. What are the differences between Foo () and @ Foo? (1 point) <br/> 24. How do I declare a class named "myclass" without methods and attributes? (1 point) <br/> 25. How do I instantiate an object named "myclass? (1 point) <br/> 26. How do you access and set attributes of a class? (2 points) <br/> 27. What is the difference between mysql_fetch_row () and mysql_fetch_array? (1 point) <br/> ------------------------------------------------------------------ <br/> 28. What are the functions of the GD library? (1 point) <br/> 29. Some methods for inputting HTML code in PHP are pointed out. (1 point) <br/> 30. Which of the following functions can open a file to read and write the file? (1 point) <br/> (a) fget () (B) file_open () (c) fopen () (d) open_file () <br/> 31. Which of the following options does not add John to the users array? (1 point) <br/> (a) $ users [] = 'john'; <br/> (B) array_add ($ users, 'john '); <br/> (c) array_push ($ users, 'john'); <br/> (d) $ users | = 'john '; <br/> 32. Will the following program enter? (1 point) <br/> $ num = 10; <br/> function multiply () {<br/> $ num = $ num * 10; <br/>}< br/> multiply (); <br/> echo $ num; <br/>?> <Br/> 33. Use PHP to write a simple query, find all the content named "Zhang San", and print it out (2 points) <br/> Table Name User <br/> name Tel content date <br/> Zhang San 13333663366 graduated from 13612312331-10-11 <br/> Zhang San graduated from-10-15 <br/> Zhang Si 021- 55665566 technical secondary school graduation <br/> Please complete the code based on the above questions: <br/> $ mysql_db = mysql_connect ("local", "root", "pass"); <br/> @ mysql_select_db ("DB", $ mysql_db ); <br/> 34. How to use the following classes and explain what the following means? (3) <br/> class test {<br/> function get_test ($ num) {<br/> $ num = MD5 (MD5 ($ num ). "EN"); <br/> return $ num; <br/>}< br/> explain <br/> 35. Format of the SQL statement to be written: insert, update, delete (4 points) <br/> Table Name User <br/> name Tel content date <br/> Zhang San 13333663366 graduated from 13612312331-10-11 <br/> Zhang San graduated from-10-15 <br/> Zhang Si 021- 55665566 technical secondary school graduation <br/> (A) there is a new record (Mr. Wang graduated from high school 13254748547-). Please use SQL statements to add it to the table <br/> (B) use an SQL statement to update Michael's time to the current system time. <br/> (c) delete all records named zhangsi <br/> 36. Write the meaning of the Data Type (INT char varchar datetime text). What is the difference between varchar and char (2 points) <br/> 37. Set mysq auto-increment type (usually the table Id field) (?) Field (1 point) <br/> 38. Write the output result of the following Program (1 point) <br/> $ B = 201; <br/> $ c = 40; <br/> $ A = $ B> $ C? 4: 5; <br/> echo $ A; <br/>?> <Br/> 39. check whether a variable has a set function? Is it a null function? (2 points) <br/> --------------------------------------------------------------------------- <br/> 40. What is the function used to obtain the total number of query result sets? (1 point) <br/> 41. $ arr = array ('James ', 'Tom', 'symfony '). Print the value of the first element (1 point) <br/> 42. Use the commas (,) to separate the array values of Question 41 and combine them into strings for output (1 point) <br/> 43. $ A = 'abcdef'; extract the value of $ A and print the first letter (1 point) <br/> 44. Can PHP be connected to databases such as SQL Server and Oracle? (1 point) <br/> 45. Write the PhP5 permission control modifier (3 points) <br/> 46. Write the PhP5 constructor and destructor (2 points) <br/> tips <br/> 47. Use phpMyAdmin to complete the following operations. <br/> (1) create a news publishing system. The table name contains the following fields (3 points) <br/> ID Article ID <br/> title article title <br/> content <br/> category_id Article category id <br/> hits clicks <br/> (2) similarly, the above news publishing system: the comment table records the user's reply content, the field is as follows (4 points) <br/> comment_id reply id <br/> ID Article ID, associated with the ID in the message table <Br/> comment_content reply content <br/> by querying the database, you need to obtain a list of article titles in the following format and sort them by the number of replies, top of the list with the highest replies <br/> Number of replies in the title of the article <br/> use an SQL statement to complete the preceding query, if the article does not reply, the number of replies is displayed as 0 <br/> (3) in the content management system described above, and the table category stores the category information. The fields are as follows (3 points) <br/> category_id int (4) not null auto_increment; <br/> categroy_name varchar (40) not null; <br/> when a user inputs an article, select the document category by selecting the drop-down menu <br/> write down how to implement this drop-down menu <br/> programming question <br/> 1. write a function that is as efficient as possible to retrieve the file extension from a standard URL <br/> example: http://www.s Ina.com.cn/abc/de/fg.php? Id = 1 need to retrieve PHP or. php <br/> 2. in the HTML language, the meta mark in the page header can be used to output the encoding format of the file. The following is a standard meta statement <br/> Use PHP to write a function, change the charset score in a standard HTML page similar to the meta tag to big5 <br/> Note: <br/> 1. you need to process the complete HTML page, that is, not only this meta statement <br/> 2. case Insensitive <br/> 3. 'And "are interchangeable here <br/> 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' are not acceptable <br/> 5. handle unnecessary spaces <br/> 3. write a function to calculate the relative path of the two files. <br/> for example, $ A = '/A/B/C/D/E. PHP '; <br/> $ B ='/ /B/12/34/C. PHP '; <br/> calculate the relative path of $ B relative to $ .. /.. /C/D add () <br/> blank question <br/> 1. in PHP, the name of the current script (excluding the path and query string) is recorded in the predefined variable ____, And the URL to the current page is recorded in the predefined variable. <Br/> 2. The execution segment outputs ____. <Br/> 3. in HTTP 1.0, Status Code 401 indicates ____. If the "file not found" prompt is returned, the header function is available. The statement is ____. <Br/> 4. The role of the Array Function arsort is ____; the role of the statement error_reporting (2047) is ____. <Br/> 5. The database connection string format in pear is ____. <Br/> 6. Write a regular expression and overwrite all JS/vbs scripts on the webpage (that is, remove the SCR limit PT mark and its content ):____. <Br/> 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. <Br/> 8. both the include and require statements can include another file to the current file. The difference is ____. To avoid multiple inclusion of the same file, you can replace them with statements. <Br/> 9. 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 ____. <Br/> 10. the parameter of a function cannot be a reference to a variable, unless in PHP. in INI, set ____ to on. <br/> 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 ____. <Br/> 12. In PHP, heredoc is a special string and its end mark must be ____. <Br/> programming question <br/> 13. Write a function to traverse all files and subfolders in a folder. <Br/> 14. Briefly describe the implementation principles of unlimited classification in the Forum. </P> <p> other links: </P> <p> http://www.webdeveloping.cn/blog? Action = show & id = 103 </P> <p> http://www.diybl.com/course/4_webprogram/php/phpxl/200824/98746_2.html </P> <p> http://career.ctocio.com.cn/286/7823786_1.shtml

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.