How to Disallow Direct Access to a File with PHP

Just include this PHP code at the top of your include file.

<?php
if (!empty($_SERVER['SCRIPT_FILENAME']) && ‘includefilename.php’ == basename($_SERVER['SCRIPT_FILENAME']))
die (‘Direct File Access Prohibited’);
?>

Search for Text Inside of PHP Files with Vista

Problem
Windows ignores text inside of PHP files because it doesn’t recognize them. This makes it very difficult to search for specific words or phrases inside of PHP files.
Solution

Perform a search on the Start Menu for “indexing”. In the results, click on “Indexing Options”.
With “Indexing Options” open, click on the “Advanced” button.
Click on the “File Types” [...]

Why You Should Show Your Most Popular Posts

Let me cut to the chase… The number one reason why you should show your reader your most popular posts is because you want to keep them on your site as long as you possibly can. It’s that simple. One thing people are short of is time and it is your job to help them. [...]

Thoughts on HP Pavilion dv6736nr

I bought another laptop on Thursday, the HP Pavilion dv6736nr. So far I am not too impressed but that may be because I am still getting used to Vista. Don’t get me wrong, Vista looks beautiful and I love the feature packed Media Center, however, Microsoft has completely overhauled the UI which makes it more [...]