Browse a Listing
Top > PHP > Tips and Tutorials > File Manipulation
Popular Tags
Free Script links
PHP gives you a variety of functions to read and manipulate directories and directory entries. Like other file-related parts of PHP, the functions are similar to the C functions that accomplish the same tasks, with some simplifications. This tutorial describes how PHP handles directories. You will look at how to create, remove, and read them.
Reading the Contents of a Directory
Deleting the Directory and Its Contents
Creating New Directories
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Feb 25, 2007 Hits: 10 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
Learn how to create a simple file upload system with your user can upload a file from the local computer to your webserver. As you will see it is not so complicated to implement this very usefull script. However it can be dangerous if every visitor can upload files without any restriction. You can easy have a situation that there is no more free space on your server.
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Mar 25, 2007 Hits: 15 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
This example browses a directory to list files and rename all files except the ones we do not want to list (as 'Thumbs.db' on windows or '..' and '.' which are not files as well as a directory itself).
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Jun 1, 2007 Hits: 9 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
Very simple to interpretate, to code and to test, its a simple way to learn how to program a upload script that select images from the MYSQL database using php programing. Image upload with MYSQL databaseThere will be 3 PHP files in this tutorial: readdir.php - this puts all the images in a folder into the database image.php - the actual image script that displays the imag view.php - an example file that shows you how to call the imageCreating the Image DatabaseFirst, create a mysql database called base64imgdb (this is the name that will be used throughout the tutorial)Second, create a table called images with two rows. Name the first one imgid, and give it the parameters TYPE: INT EXTRA: auto_increment, and check the circle under Primary. Name the second sixfourdata, and make it TYPE: LONGTEXT.
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Jun 19, 2007 Hits: 18 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
include() is probally one of the most commonly used PHP functions, it allows you to display the content of a file within another page with just one simple line.
There's probally many things you could make use of php includes for, the most common being a template based website where you'll have a number of content pages but only one or two pages with the code for the main layout which is then included into the content pages.
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Jun 29, 2007 Hits: 14 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
Member Reviews
Visitor Ratings
Google PR
This article contains:
1. Introduction to compression with PHP.. extending PHP with extensions.
2. Using ZIP
3. Using gZip
4. Using bZip2 and LZF
5. Using 'File_Archive' PEAR package
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Jul 28, 2007 Hits: 4 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
We've mostly focused on MySQL-type tutorials, but we'll show you in this tutorial the basics of file handling. This includes opening a directory and listing the files, opening a file and showing it's contents and opening, then modifying a file. Deleting a file too!
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Mar 23, 2008 Hits: 15 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
Xfunda - get the excellent fundamental, source code on php, CSS, flash, photoshop, xml, .net, vb, C#, asp, javascript.
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: Apr 28, 2008 Hits: 62 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR
This is the simple example to list contents of any Directory. To do this we are going to define function DirDisply( ) which will read the current directory contents and display it as a list.
Category:
Write a Review
Add Favorite
Refer it to Friend
Report Broken Link
Date Added: May 19, 2008 Hits: 3 Rating: 0.00 Votes: 0
Member Reviews
Visitor Ratings
Google PR