当我尝试显示管理界面的所有用户时,我收到此错误
注意:unserialize():偏移量为0的6个字节的错误
//router.js
module.exports = function(io) {
var router = //What you declared it to be
router.route("/addmenu").post(function (req, res) {
menuModel.addMenu(req.body,function(data){
//I WANT EMIT HERE
res.json(data)
});
};
);
return router;
}
//server.js
//Change this line to be like the one below
var router = require('./app/router');
//.........
//.......
//Desired way
var router = require('./app/router')(io);
这是我的用户类
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace AdminBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
/**
* Description of AdminController
*
* @author saif
*/
class AdminController extends Controller {
public function valide_compteAction()
{
$em=$this->getDoctrine()->getManager();
$utilisateur=$em->getRepository('WelcomeBundle:Utilisateur')->findall();
return $this->render('AdminBundle:admin:valide_compte.html.twig',array('i'=>$utilisateur));
}
}
我怎么能解决这个问题,我已经浪费了很多时间在这个
答案 0 :(得分:0)
检查数据库中的序列化数据。他们一致吗?数据库驱动程序可能采用其他数据类型。在这种情况下,请检查照片列的斑点类型。我在json / array类型上也遇到过类似的问题。