无效请求(UNEXPECTED EOF)PHP

时间:2015-08-24 06:57:11

标签: php

所以我开始处理这个问题已经有2个小时了。我只在CLI中获得Invalid Request (UNEXPECTED EOF)而无法调试。这是我创建的课程:

$newUserLastID = NULL;
    function addNewUser($request, $team) {
        global $newUserLastID;

        $db = new db();
        $db->setErrorCallbackFunction("myErrorHandler", "text");
        $status = "1";
        $activated = "1";
        $randString = generateRandomString();
        $hashed = password_hash($randString, PASSWORD_BCRYPT);


        $db->insert("accounts", array(
                    "team" => $team,
                    "username" => $request,
                    "nickname" => $request,
                    "password" => $hashed,
                    "status" => $status,
                    //"recruiter" => $recruiterID,
                    "activation" => $activated,
                    "textpword" => $randString

                ));
        $newUserLastID = $db->lastInsertId(); 
         return $newUserLastID;

    }

当我想获得$newUserLastID值时,

$somevar = addNewUser('DummyData', 'DummyData2');

代码正在执行但是,我总是在我的CLI中获得Invalid Request (UNEXPECTED EOF)并停止。您认为我的代码有什么问题?

0 个答案:

没有答案