CGI 浏览器无法得到正确反馈

在看前后端交互,Python + js

$.get()会把处理数据的py文件代码console.log()到浏览器;

$.post()则不会出结果,且报错:code 501, message Can only POST to CGI scripts;

查了下,CGI脚本必须位于cgi-bin文件夹中

出处:https://stackoverflow.com/questions/5163118/why-wont-my-simple-cgi-server-handle-ajax-post-requests

posted @ 2018-05-02 16:17  风缘  阅读(979)  评论(0)    收藏  举报