Cross origin requests are only supported for HTTP but it's not cross-domain

后端 未结 9 1680
花落未央
花落未央 2020-11-22 08:54

I\'m using this code to make an AJAX request:

$(\"#userBarSignup\").click(function(){
    $.get(\"C:/xampp/htdocs/webname/resources/templates/signup.php\",
          


        
9条回答
  •  既然无缘
    2020-11-22 09:11

    You can also start a server without python using php interpreter.

    E.g:

    cd /your/path/to/website/root
    php -S localhost:8000
    

    This can be useful if you want an alternative to npm, as php utility comes preinstalled on some OS' (including Mac).

提交回复
热议问题