13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

442 Chapter 19 Interacting with the File System <strong>and</strong> the Server<br />

Listing 19.5 sc<strong>and</strong>ir.php—Uses the sc<strong>and</strong>ir() Function to Sort the Filenames<br />

Alphabetically<br />

<br />

<br />

Browse Directories<br />

<br />

<br />

Browsing<br />

<br />

<br />

<br />

Getting Information About the Current Directory<br />

You can obtain some additional information given a path to a file.<br />

The dirname($path) <strong>and</strong> basename($path) functions return the directory part of<br />

the path <strong>and</strong> filename part of the path, respectively.This information could be useful for

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!