如何在mod_wsgi的相同域(apache2)上运行Django和PHP?
我想在同一个域中运行Django和PHP(例如,当我访问192.168.14.10时,索引页面正确显示,PHP从索引页面调用)。当我运行下面的代码时,HTML代码中的数据只是完整的PHP和PHP的代码不起作用。 HTML(myproject / templates / test.html) <body> <form id="form_test"> <button type="button" onclick="exec_php()">Send</button> <script> function exec_php() { var formdata = new FormData($('#form_test').get(0)); $.ajax({ url: "../testphp", type: "POST", data: formdata, cache: false, contentType: false, processData: false, dataType: "text" }) .done(function (data, textStatus, jqXHR) { alert("data: " + data); }) .fail(function (jqXHR, textStatus, errorThrown) { alert("fail"); }); } […]