David Walsh Tutorials
Block Access to Include Files Using .htaccess
When I build websites for clients and myself, I use numerous include files to make my website easy to maintain. These include files may:be composed of pure HTML; no server-side programming involvedbe PHP class files; used throughout the websitecomposed of both HTML and PHPPHP code...
Free SitePoint Ruby on Rails Book!
I'm a big fan of SitePoint. I'm not a fan of Ruby on Rails, mostly because of the pathetic Rails Envy mock commercials, but I'm a huge fan of expanding one's knowledge.For a limited time, SitePoint is offering a FULL book, Build Your Own Ruby...
WordPress’ .htaccess File Is Genius
Choosing to use WordPress was a more difficult decision that you may think. Sure, WordPress is the most used blogging software on the internet, but I'm a programmer, right? I should want to code everything myself, right? I thought that at first but...
Prevent Image Hotlinking With .htaccess and mod_rewrite
One way to kill your website's bandwidth and overall download speed is to not block image "hotlinking." What's hotlinking? Hotlinking is linking to a file on an external server that the Web Developer does not own (most of the time the Web Developer doesn't...
Suppressing PHP Errors & Warnings Using @
One part of making sure your website is secure in its hosting environment is to handle errors in a good fashion. If you don't have complete control of your hosting environment, you don't know what you can expect in the way of error handling if...
PHP Cookies: How to Set Cookies & Get Cookies
Cookies don't have to be an essential part of a website but can provide some of the "little things" that can set your website apart from the rest. Cookies are small tidbits of information that you save on the client's computer so that you can...
Set Your Site’s Date/Time Settings On Shared Hosting Using PHP5’s date_default_timezone_set()
One annoyance with putting my customer's site on shared hosting is not being able to control the date and time on the hosting server. Sure, I could simply host with a local company but that's not always the most cost-effective option.I use a new function...
PHP’s Magic Constants: __LINE__ , __FILE__, __FUNCTION__, __CLASS__, and __METHOD__
Setting constants in PHP is as easy as using the define function, but PHP creates a few constants in every script for you that help mostly for debugging purposes (well, that's generally the only time I use them). These constants are called "magic constants."Magic constants...
Weekend Links – Usability Nightmares, DOM Scripting, Lint, jEdit & PHP, World’s Largest Websites
I link you, I link you a lot...10 Usability Nightmares You Should Be Aware OfSmashing magazine put together a great list of usability-killers frequently seen on websites. Don't make these mistakes!http://www.smashingmagazine.com/2007/09/27/10-usability-nightmares-you-should-be-aware-of/Accelerated DOM ScriptingJonathan Snook has written another book, this time about DOM...
Advanced Branding – Give Your Pages A Custom Extension Using .htaccess SetHandler
A sign of a good website is one that does the "little things" to increase the usability or value to the user. There are other little things you can do to enhance your website, including giving your pages a custom extension.The Code What the following code...