I have a https server running on my windows 10 system for developing purpose... And it really is fine comparing to a real server for developing but I faced an annoying issue which I don't know if there is a solution for it at all;
I have a function called Preload like this:
function Preloading() {
$.ajax({
type: 'POST',
url: 'https://localhost/preload.php',
data: {id: "testdata", directories: directories},
dataType: 'json',
cache: false,
success: function(result) {
if(preloadFirstTime === false) return;
preload(result);
preloadFirstTime = false;
},
});
}
As you see I want to hit this URL to run the ajax call https://localhost/preload.php
which I know is correct URL of the file because I can see other files in the same URL.
But each time I get this error:
POST https://localhost/preload.php 405
Here is the screen capture if I want to run the php file:
How can I fix this? I wish there is a solution if not I have to buy a server and do the job on it :(
UPDATE:
source https://stackoverflow.com/questions/68199982/fix-post-https-localhost-somefile-php-405-error
Comments
Post a Comment