A full(-ish) list of MIME Types that may come in usefull for upload validatiuon.
[More]
Archive for the ‘ PHP ’ Category
This value is generally set in the httpd.conf (server) file, which is generally not accessible to users on shared hosting packages. So, here are a few ways to get around this.
[More]
An example of how to send Text & HTML email with an attachment.
[More]
Displaying the day-part of the date, followed by the month etc. just looks plain wrong and lazy – ’20 September 2009′. ’20th’ would look much nicer and can be achieved without too much hard work. A simple function…
[More]
Backing up a MySQL database using PHP.
[More]
This has got to be the most self-explanatory, most obvious, but coolest function ever!
[More]
I usually write my own vars out to the screen for debugging using ‘print_r($_SESSION)’,'print_r($_POST)’etc inside <pre> tags, but this is awesome! (a little too much even). It’s like phpinfo(), but for your webpage!
[More]
Search, with no click
October 14, 2008 | Comments | HTML, Javascript, PHP
How do you style a search button? They all look crap to me, and the default browser ones are all different. So, my solution is to get rid of it. Gone. No button. Heres how…
string basename ( string $path [, string $suffix ] )
- PATH :: A path. On Windows, both slash (/) and backslash (\) are used as directory separator character. In other environments, it is the forward slash (/).
suffix. - SUFFIX :: If the filename ends in suffix this will also be cut off.
I use this a lot to distinguish which page I am on. Generally, I would match this to a db record to get page-specific info and settings from the database.
[More]