Unfortunately, one legacy system I worked with didn't do this. So I used jQuery's ajaxPrefilter on the client to modify the calling method.
ajaxPrefilter demo
Use comparison
// After transformation
$.post('/ajax/dir/page/action',{page:1})
// Before transformation
$.post('/ajax.php',{
dir : 'dir',
page : 'page',
action : 'action',
args : JSON.stringify( { page:1 })
});
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn