It’s been a while!

This blog has sat unloved for nearly 12 years so I am going to try and breathe some new life into it by writing about Football especially Coventry City, Cricket, Motor Cycling, Web Stuff and anything else that comes to mind.

Linking PHP includes used in files triggered by cron jobs

This is more of a reminder than a tutorial, when using PHP Includes in files triggered by CRON jobs you cannot use the normal relative links in your include or require statement you have you include the full server path to the file.

To do this you can use __DIR__ if the version of PHP you are running is greater than 5.3 like so:


<?php require_once(__DIR__.'/path/to/directory/file.php'); ?>