Core Predefined Constants These constants are defined by the PHP core. This includes PHP, the Zend engine, and SAPI modules.
Daily Archives: March 15, 2011
PHP Rename File If Exists
function rename_if_exists($dir, $filename) { $ext = strrchr($filename, ‘.’); $prefix = substr($filename, 0, -strlen($ext)); $i = 0; while(file_exists($dir . $filename)) { // If file exists, add a number to it. $filename = $prefix . ++$i . $ext; } return $filename; }
PHP readfile
Returns the number of bytes read from the file. If an error occurs, FALSE is returned and unless the function was called as @readfile(), an error message is printed.
Open old posts in Windows Live Writer
How to open old posts in windows writer!
Redirecting non-www to www with .htaccess
If you want to redirect all non-www requests to your site to the www version, all you need to do is add the following code to your .htaccess file:
SEO Tools Comparison: Raven Tools, SEOmoz & BuzzStream
Raven SEO tools The Raven suite of tools* were originally designed for SEO’s (and by an SEO agency) but they now feature quite a few extra features for other disciplines of internet marketing so there’s Mailchimp integration, Facebook page manager and a Twitter tool. For the purposes of this review we’ll stick to the SEO …
Continue reading “SEO Tools Comparison: Raven Tools, SEOmoz & BuzzStream”