Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged directory



« Prev 1 2
This code allows to calculate the full size of a directory using PHP.
0 2719 posted 8 years ago by apphp-snippets
This example shows you how to create redirection o another directory. It may be useful, for example, when you have a project, placed in sub-directory.
0 2648 posted 9 years ago by apphp-snippets
Get Current Server Path in PHP
1 1908 posted 10 years ago by ursdeep
An Utility to Search Text in All Files of Any Directory in PHP
1 1938 posted 10 years ago by ursdeep
This code allows to list the contents of any given directory.
1 1535 posted 12 years ago by apphp-snippets
If you are using the [TimThumb](http://code.google.com/p/timthumb/ "TimThumb on Google Code") script with a URL the contains tildes (~) and images are breaking, here is the fix... I did not create this snippet but found it extremely useful so I th...
0 1744 posted 12 years ago by tacudtap
list all files in directory and subdirectory
1 1882 posted 13 years ago by ne7son
Getting files, folders, file count, folder count in a directory with php and writing them to a web page
1 3422 posted 13 years ago by duzenz
0 1284 posted 14 years ago by nebojsac
This function empties the folder recursively. Two parameters are passed in the function, First one is the directory to be emptied and second one is the flag to determine whether to delete the given folder. If set 'true', given folder is also removed...
0 1513 posted 14 years ago by nilambar
There are a lot of recursive glob functions out there but they don't build a tree, they build a 1 dimensional array...This function builds a directory tree.
1 1253 posted 14 years ago by danoph
There seems to be many scan directory systems but I could not find one that works the way I needed. I added in functionality for a search filter and an ignore list. The search filter and ignore list can ignore by extension, file (case-sensitive file...
1 1694 posted 14 years ago by SoN9ne
Returns an array of files that match a search term in a certain directory.
1 1206 posted 15 years ago by mattkenefick
1 1336 posted 15 years ago by nveselinov
0 2338 posted 15 years ago by iloveitaly
Loops through all files of a certain extension in the specified directory. Can be used to list all images in a given directory.
0 1399 posted 15 years ago by sandman7OR
Función para obtener el tamaño de un directorio:
0 1423 posted 15 years ago by jrobinsonc
Very simple to use. **Calling:** $files = dirContents(DIR_PATH, [FILTER, [TYPE]]); **Examples:** $files = dirContens("my-dir"); _$files_ is array containing all, both files either directories $files = dirContens("my-dir",...
0 1044 posted 15 years ago by Lostindream
Here is a function you can use to automatically set up a complex folder structure with a specified file mode. All you have to do is create the "root" directory and pass an array describing the folder structure you would like to create in it. If the d...
0 1117 posted 15 years ago by chlab
1 1469 posted 15 years ago by ginoplusio
0 1231 posted 15 years ago by Zwendel
Calculate dir size recursive, follow the link above because the version above is better.
0 1315 posted 15 years ago by ginoplusio
0 1040 posted 16 years ago by garretjames
Sometime it is convenient to get recursive directory listing as array of items directory => (file array) Such as: Array ( [./a2temple] => Array ( [0] => example13.zip )...
2 1170 posted 16 years ago by artoodetoo
0 1191 posted 16 years ago by paulgrenwood
0 1158 posted 16 years ago by dsntos
By requinix
0 1034 posted 16 years ago by smoover
3 1495 posted 16 years ago by fackz
« Prev 1 2