I need to access the mail.php file to submit the form / through the node I can not, because I don't know him (I'll do it in the old manner)
$('#form1').submit(function () { var formId = $(this).attr('id'); var formNm = $('#' + formId); var msg = $(formNm).serialize(); $.ajax({ type: 'POST', url: '~/static/mail.php', // вот я не знаю как к нему тут обратиться data: msg, success: function(data) { console.log('Отправлено') }, error: function(xhr, str){ console.log('Ошибка') } }); }) As a result, error 404, because it can not find the file What to do? where to shove it?