Php 调用未定义的Slim\Http\Request::with status()方法
我解决不了这个问题 $\u会话['usernam']故意转到else是错误的 Middleware.php app.jsPhp 调用未定义的Slim\Http\Request::with status()方法,php,slim,status,Php,Slim,Status,我解决不了这个问题 $\u会话['usernam']故意转到else是错误的 Middleware.php app.js 参数的顺序是错误的,接下来是它的请求-响应 改变 function ($response, $request, $next) { 为此: function ($request, $response, $next) { 这让我避免了一个完全不同的场景,但类似的错误。公共函数index_address$response,$request{…}我像代码一样切换了参数,所有的一切
参数的顺序是错误的,接下来是它的请求-响应 改变
function ($response, $request, $next) {
为此:
function ($request, $response, $next) {
这让我避免了一个完全不同的场景,但类似的错误。公共函数index_address$response,$request{…}我像代码一样切换了参数,所有的一切都崩溃了。
$(function() {
$('#log-in').click(function(){
var data = {'username': $('#username').val(), 'password': $('#password').val()};
data = JSON.stringify(data);
$.ajax({
type : 'POST',
url : 'login',
dataType : 'json',
data : {data:data},
success: function(data){
if (data == 'ok'){
window.location.replace("athletes");
} else {
new PNotify({
title: 'Ooops!',
text: 'Username ou Password incorretos.',
type: 'danger',
styling: 'bootstrap3'
});
};
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
new PNotify({
title: 'Oh No!',
text: 'Erro! Por favor, contate o administrador.',
type: 'warning',
styling: 'bootstrap3'
});
}
});
});
});
function ($response, $request, $next) {
function ($request, $response, $next) {