What are php file operation functions?

Source: Internet
Author: User
What are php file operation functions?

  1. /*
  2. * 1. get the path file name
  3. * String basename (string path [, string suffix])
  4. * 2. obtain the Directory of the path
  5. * String dirname (string path)
  6. * 3. Learn more about paths.
  7. * Array pathinfo (string path)
  8. * 4. determine the absolute path.
  9. * String realpath (string path)
  10. * 5. determine the file size.
  11. * Int filesize (string filename)
  12. * 6. calculate the available disk space
  13. * Float disk_free_space (string directory)
  14. * 7. calculate the total disk capacity
  15. * Float disk_total_space (string directory)
  16. * 8. determine the last object access time.
  17. * Int fileatime (string filename)
  18. * 9. determine the last File change time
  19. * Int filectime (string filename)
  20. * 10. determine the last file modification time.
  21. * Int filemtime (string filename)
  22. * 11. identify the end character of a file
  23. * Int feof (string resource)
  24. * 12. open and close files
  25. * Resource fopen (string resource, string mode [, int use_include_path [, resource zountext])
  26. * Boolean fclose (resource filehandle)
  27. * 13. read files into arrays
  28. * Array file9string filename [, int user_inlucde_path [, resource context])
  29. * 14. read the file content into string variables
  30. * String file_get_contents (string filename [, int use_inlude_path [resource context])
  31. * 15. read CSV files into arrays
  32. * Array fgetcsv (resource handle [, int length [, string delimiter [, string enclosure])
  33. * 16. read a specified number of characters
  34. * String fgets (resource handle [, int length])
  35. * 17. remove all HTML and PHP tags from the input.
  36. * String fgetss (resourcce handle, int length [, string allowable_tags])
  37. * 18. one character is read at a time.
  38. * String fgetc (resource handle)
  39. * 19. Ignore line breaks
  40. * String freed (resource handle, int length)
  41. * 20. Read the entire file
  42. * Int readfile (string filename [, int use_include_path])
  43. * 21. read files in predefined formats
  44. * Mixed fscanf (resource handle, string format [, string var1])
  45. * 22. write strings to files.
  46. * Int fwrite (resource handle, string [, int length])
  47. * 23. move the file pointer
  48. * Int fseek (resource handle, int offset [, int whence])
  49. *
  50. * 1. open the directory handle.
  51. * Resource opendir (string path)
  52. * 2. close the directory handle.
  53. * Void closedir (resource directory_handle)
  54. * 3. parse the directory content
  55. * String readdir (resource directory_handle)
  56. * 4. Read the directory into an array.
  57. * Array scandir (string directory [, int sorting_order [, resource context])
  58. *
  59. *
  60. * 1. delete a directory
  61. * Int rmdir (string dirname)
  62. * 2. rename a file
  63. * Boolean rename (string olename, string newname)
  64. * 3. touch a file
  65. * Int touch (sting filename [, int time [, int atime])
  66. */

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.