Php programmer interview questions-php Tutorial

Source: Internet
Author: User
Php programmer interview questions

  1. /**
  2. * Traverse the directory and save the result to an array. Php4 and above are supported. Php5 and later use the scandir () function to replace the while loop.
  3. * @ Param string $ dir
  4. * @ Return array
  5. */
  6. My_scandir ($ dir)
  7. {
  8. $ Files = array ();
  9. If ($ handle = opendir ($ dir ))
  10. {
  11. While ($ file = readdir ($ handle ))! = False)
  12. {
  13. If ($ file! = "..." & $ File! = ".")
  14. {
  15. If (is_dir ($ dir. "/". $ file ))
  16. {
  17. $ Files [$ file] = rec_scandir ($ dir. "/". $ file );
  18. }
  19. Else
  20. {
  21. $ Files [] = $ file;
  22. }
  23. }
  24. }
  25. Closedir ($ handle );
  26. Return $ files;
  27. }
  28. }

Briefly describe the implementation principles of unlimited classification in the forum. 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.

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.