I have a simple php file that prints the date and time. I would like to load this file with jQuery so it shows the $date variable. Can't seem see why this is not working, any advice on why?
My php file:
<?php
date_default_timezone_set('GMT');
$date = date('d/m/Y H:i:s');
print $date;?>
My on page code:
<script>$(document).load(function(){
$('#time').load('http://www.my-website.co.uk/my-php-file.php');});</script>
<div id="time"></div>