я сделал так
echo '<script>
function show()
{
$.ajax({
url: "' . $set['homeurl'] . '/ajax/time.php",
cache: false,
success: function(html){
$("#time").html(html);
}
});
}
$(document).ready(function(){
show();
setInterval(\'show()\',1000);
});
</script>';скрипт обновляет блок time:
<div id="time"></div> из файла time.php(надеюсь понял какой файл будет выводиться при обновлении) и подключение ajax в шапке <script type="text/javascript" src="' . $set['homeurl'] . '/ajax/jquery.js"></script>(это в моем случае)