| Web Development >> PHP |
Scanning Folders with PHP
| Language: | English | Quality: | High | Has Audio: | true | Source: | Other | Media: | Flash | Posted On: | 14 Mar 09 |
|
Let's imagine that you want to build a page that will display snapshots of your latest work. One way to do this would be to hard-code the images into your document. The obvious repercussion is that, every time you want to add a new item, you must manually update your html document. Another method would be to store and retrieve the information from a MYSQL database. This will function perfectly, though for many sites, this solution may possibly offer far more power than is technically needed - not to mention the increase in hosting costs.
In such instances, the best solution is to make PHP scan your "portfolio" folder and dynamically create the code for you. If you want to update your page with a new snapshot, all that you need to do is drag the image, and its respective thumbnail, into the appropriate folders - and PHP will do the rest. Let's build it now! |
Tags: screencast, nettuts, php, mysql, scanning folders, development, web development, hosting, [SUGGEST A TAG]
|