This configuration is extremely unstable. In different browsers, it may work once, or not display data at all.
axiosDate.php
<?php
$today = date("d.m.Y, H:i");
echo $today;
?>
component.vue
<template>
<div class="info" id="date">date</div>
</template>
<script>
import axios from 'axios'
mounted() {
axios.get('/axiosDate.php')
.then(respond => {
document.getElementById('date').innerHTML = respond.data;
}),
}
</script>
tell me how to put the data in the div "date"?