Three useful PHP functions for locating yourself on your site. They can come in useful for when you want to create links in code for external use. The nice part about these is that if you are on SSL, they will generate an SSL link.
Please excuse my wordpress code plugin. It doesn’t seem to be converting less and greater than characters correctly.
I’ve noticed setting the Expire time for files on the HTACCESS file tends to fail when loading a file using the readfile() function in PHP. A workaround is setting the Expire header before loading the file. This is what that would look like.
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 60*15); // seconds, minutes
Now when you check the expiration headers via your browser’s Developer Tools you will see this particular file expires one month from now.