A collection of 14 tips on PHP functions on file input and output. Clear answers are provided with tutorial exercises on opening files for reading and writing, appending data to existing files, reading file by line or character, reading file in binary mode. Special topics are:
How To Append New Data to the End of a File?
How To Read One Character from a File?
How To Read a File in Binary Mode?
How To Read Data from Keyborad (Standard Input)?
How To Open Standard Output as a File Handle?
Platform(s): Linux, Windows, FreeBSD, Mac OSX, Sun Solaris
A collection of 12 tips on uploading files with PHP pages. Clear explanations and tutorial exercises are provided on creating file upload HTML tags, setting encoding type on HTML forms, getting uploaded file information, storing uploaded file in database.
Platform(s): Linux, Windows, FreeBSD, Mac OSX, Sun Solaris
A collection of 8 tutorials on working with directories and files:
How To Create a Directory?
How To Remove an Empty Directory?
How To Remove a File?
How To Copy a File?
How To Dump the Contents of a Directory into an Array?
How To Read a Directory One Entry at a Time?
How To Get the Directory Name out of a File Path Name?
How To Break a File Path Name into Parts?
Nowadays, PHP programmers generally use databases such as MySQL to do everything, however, every programmer should at least know the basics of reading and writing to files - that IS what a database does. Come read an all you need to know introduction to file handling.
Following on from Simple Text Storage With PHP, when using flat-file storage you also need to pull the data from the text files. This tutorial will explain how to extract a piece of information from a text file and display it.
This script renames all the files (or some of the files) in a given directory (default is cureeent dir) with a random names, leaving the extensions as they were before.
This is a brief tutorial for those who are new to php, and dont know much php. Here they will learn how to upload files through php. In the next version there will be alot of great features added. Like Multiple Files Uploading
Using Arrays & Loops
Making new folders/files
Editing Files
etc...
This tutorial explains how to parse a given text file and display specific content using PHP. The presented example shows how to parse a weather information for your desired city. It also includes a shell script for downloading the weather data text file from http://weather.noaa.gov.