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.
It is common to have downloads on your website, and sometimes you want to moderate your downloads by speed, or possibly hide the directory that the download is coming from, protecting all your other files. This is very possible and very simple to solve in PHP. All you need is the header() function and some files function.
Returns the directory from a string.
EX: /test/ FROM /test/blah.php
Shows how to create functions, use explode(), count(), while() and preg_replace() functions.