Skip to content
bbminfo – Learn from Scratch
Subjects Code examples Library reference
Computer Programming Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy

Tutorial menu

Subjects

Computer Programming MathsPlanned ChemistryPlanned

Lesson contents

Programming resources

All languages Code examples Library reference

Programming languages

Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy
Tutorials/Computer Programming/PHP/Library/Files and paths

PHP files and paths

Build a receipt path, save a note, or read a shopping list.

stream_get_contentsfstatcopy

Browse by topic

  • Names and locations2
  • Read and write3
  • Manage files and folders6
  • Inspect files and storage4

Names and locations

  • basename and DIRECTORY_SEPARATORBuild a receipt path without hard-coded separators
  • basename and dirnamePrint a receipt name and its folder
Advertisements

Read and write

  • file_get_contents and ordRecover the brightest setting from a preset
  • fwriteSave an item to a grocery note
  • stream_get_contentsRead a saved shopping note

Manage files and folders

  • DirectoryIteratorCount only the invoices in a folder
  • copyKeep a separate copy of a receipt
  • mkdir with recursive creationPrepare nested hand-in folders
  • renamePublish a signed attendance sheet
  • symlink and readlinkFollow a shortcut to the latest timetable
  • unlinkClear a disposable print preview

Inspect files and storage

  • disk_total_spaceCheck room for a class recording
  • fstatCheck a receipt attachment size
  • is_file and is_dirTell an uploaded file apart from its folder
  • touch and filemtimeRestore a newsletter publication date

All PHP library sections

PHP tutorials

Environment setup› Library reference› Data structures› Code examples›
Advertisements
bbminfo – Learn from Scratch
© 2026 bbminfoArtwork creditsPrivacy policy