Welcome To Snipplr


Everyone's Recent Snippets Tagged file



0 1578 posted 17 years ago by scalhoun2005
These 4 lines of code can be used to extract and return all links from any page using regex patterns. If links are found, an array is returned, else boolean false is returned.
4 2977 posted 17 years ago by gdvickery
This method is a bit faster and more reliable then using the "explode" method. Works with PHP 4.0.3 and up.
4 2428 posted 17 years ago by gdvickery
1 1761 posted 17 years ago by jonniespratley
You only use the filename as $value for get_mimetype().
1 1905 posted 17 years ago by fackz
1 2140 posted 17 years ago by ginoplusio
0 1655 posted 17 years ago by archlight
Reads a linux file, line by line
2 2074 posted 17 years ago by sanjivarunsahayamhotmailcom
1. Edit the html form 'action' to point to your PHP page that handles the upload. 2. Create the php page with the code below 3. Define Paths in PHP lines: 3 , 4 of php file 4. Create matching folder to paths in #3 on server. 5. chmod that folder...
4 2459 posted 17 years ago by jadedbat
Q: How do I write a structure to a file? A: You can easily write a structure to a file as long as the structure is what is known as a POD (Plain Old Data) type. This means that all members of the structure must be of a fixed size, which implies th...
1 7214 posted 17 years ago by architect
0 1858 posted 17 years ago by roock
Article explains why STRINGIFY and TOSTRING are both needed. This technique is useful for embedded apps to print debug strings to a debug console. ASSERT or TRACE statements can incorporate these macros. The line numbers are converted to strings a...
0 2069 posted 17 years ago by jimfred
This simple code return the name of files
1 1641 posted 17 years ago by cobra90nj
Rake task - Copies files from one directory to another in a batch of 50 files, giving 15 seconds break between each batch.
1 2194 posted 17 years ago by cnicolaou
1 2239 posted 17 years ago by meetneps
1 1963 posted 17 years ago by eugegim
If you get "JPEG marker not found!" error when you try to open an image file you must read it in binary mode.
1 1818 posted 17 years ago by PixelMin
Two different loading methods for external files.
0 1671 posted 18 years ago by 1man
3 2268 posted 18 years ago by benphelps
3 2484 posted 18 years ago by benphelps
3 2283 posted 18 years ago by gbot
Send file from different name
1 1792 posted 18 years ago by tonic
Expands a MySQL / Gzipped file and executes it's queries.
0 2044 posted 18 years ago by mattkenefick
include file protection...
2 1884 posted 18 years ago by skywalker
By default, Emacs displays on the titlebar (I mean GUI Emacs) emacs@domain. There is a way to modify this, using (setq frame-title-format "my title"). How to display emacs@domain: ~/dir/file (or buffer name in case of e.i. *scratch*)? Add it to yo...
1 3917 posted 18 years ago by coldpeer