I have a simple web app which runs a server using a certain port, Is it possible to use an ajax function from inside its index.html to call a php file, as the following:
{
$.ajax({
url:"fetch.php",
method:"post",
data:{query:query},
success:function(data)
{
$('#result').html(data);
}
});
}
A B4J (Java) app runs the server with a certain port, which can be launched on a web browser. The php file is called from inside the home page (html) of the Java app server. On a usual server (like localhost on a PC) the php file is executed without any problem, but here it is not.
source https://stackoverflow.com/questions/70022968/how-a-php-file-can-be-called-from-a-web-app
No comments:
Post a Comment