Web Development Tutorials
//

Tag: File Handling

Programming

List Files in a Directory With PHP

Inventory a folder with PHP: match a pattern with glob(), read every entry with scandir(), walk sub-folders with RecursiveDirectoryIterator, then sort by size or…

August 13, 2026

Database Administration

Export MySQL Query Results to a CSV File

SELECT ... INTO OUTFILE turns any query into a spreadsheet file, written by the server itself. Handle the quoting that keeps embedded commas safe,…

August 13, 2026

Programming

Force a File Download in PHP

Send the Content-Disposition and Content-Type headers that make a browser save a file instead of opening it, then stream the bytes with readfile() —…

August 3, 2026

Programming

Read A CSV File In PHP

Read a CSV file in PHP with fgetcsv(), which splits each row into an array and keeps quoted fields containing commas intact. Pair it…

July 20, 2026