Tiny PHP Uploader





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 4 5 6 7 8 9  ...  15 16 Next »
-2
Date Submitted Thu. Mar. 2nd, 2006 5:03 AM
Revision 1
Syntax Master dannyboy
Tags exists | File | Folder | VBSCRIPT
Comments 0 comments

Checks to see if a file or folder exists
The fFile variable determines whether you're
looking for a File (True) or Folder(False)
The strName variable holds the fully qualified
path you're looking For
0
Date Submitted Wed. Oct. 29th, 2008 9:21 AM
Revision 1
Helper Celebhir
Tags Directory | Files | PHP | Recursive | structure | tree
Comments 0 comments
Takes a given directory and lists all the files and folders under it, including sub folders. Resulting array contains associative (folders) and indexed (files) elements. Doesn't return "." and ".."
0
Date Submitted Wed. Oct. 29th, 2008 10:51 AM
Revision 1
Helper Celebhir
Tags Directory | find | Folder | PHP | Recursive | search
Comments 1 comments
This function takes a directory, and a "folder" search parameter.
If it finds the directory (either in single level, or any sub folder) it will return the relative path of that folder. "FALSE" if not found. Skips over files and "." and ".." directories. Recursive by default.
0
Date Submitted Wed. Oct. 29th, 2008 11:26 AM
Revision 1
Helper Celebhir
Tags Directory | File | PHP | Recursive | search
Comments 0 comments
This function tries to locate a file in a give folder (either single level, or in any sub folder). Returns the relative file and path, or FALSE if not found. Skips over "." and "..".
1
Date Submitted Thu. Aug. 28th, 2008 9:33 AM
Revision 1
Scripter Fordiman
Tags buffering | errors | Output | PHP | template
Comments 0 comments
Best use of ob_, custom error handling, and variable variales evar: simple templating.

_parse($filename[,$locals])
includes $filename and renders its output to the return value. $locals, if used, will add a set of variables to the included context.

Parse($template[,$locals])
Same as above, but allows you to define a base template folder and omit the .php - just for cleaner code.

t($template[,$obj])
...
t()
Same as Parse, but any output between the opening call and the closing call (no arguments) will be buffered intot he $content variable of the template.

Play around with t(..) to find out more; I don't feel like documenting it.
1
Date Submitted Tue. Sep. 4th, 2007 7:28 PM
Revision 1
Helper explode
Tags PHP | Random
Comments 1 comments
This little function does great for passwords, usernames, files, and anything else you need a random string for.
1
Date Submitted Tue. Nov. 4th, 2008 8:32 AM
Revision 1
Beginner cicero
Tags identify | Key | PHP | Random | unique
Comments 1 comments
This php script provides a unique random key with 32 characters and can be used to avoid the system to pass some primary keys across the url, by example.
2
Date Submitted Fri. Jun. 27th, 2008 11:29 AM
Revision 1
Scripter Fordiman
Tags PHP | templating
Comments 1 comments
A simple function (with support) that can provide the backbone to any templating system.
2
Date Submitted Wed. Aug. 13th, 2008 11:34 PM
Revision 1
Scripter Fordiman
Tags easy | mysql | PHP
Comments 0 comments
My previous entry on an easy to use SQLite interface for XUL/JS got me thinking: how many times have I had to write functions that were just wrappers for a little SQL?

Below is the fruits of that little query (excuse the pun). Forgive the dbXXX functions; my implementation depended on a small portion of a larger mysql library that I've grown accustomed to coding with.
2
Date Submitted Tue. Apr. 10th, 2007 9:39 PM
Revision 1
Helper snowdonkey
Tags Form | PHP | Validate
Comments 3 comments
The following script is a single interface for pre-validating any HTML form. It lets you validate your form data the way you want, while handling the rudimentary tasks itself.

1) Change just one variable to make it work with $_GET or $_POST or $_REQUEST.

2) Name which elements are 'required' all at once in a hidden HTML text input.

3) Easily provide field descriptions in hidden HTML text inputs that you can use to print error statements.

4) Call a single function to print out error statements that you can easily style with CSS.

5) It automatically checks if fields marked 'required' have been filled out.

Most of the pre-validation code is from PHP 5: Unleashed by Sams Publishing. I found it extremely useful for a recent project. Sharing it here, I removed some unnecessary functions, and tried to simplify some points.

All the comments are my own; hopefully I provided more than enough explanation.
« Previous 1 2 3 4 5 6 7 8 9  ...  15 16 Next »