![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 6 381 Pomógł: 1116 Dołączył: 30.08.2006 Ostrzeżenie: (0%) ![]() ![]() |
Mam problem z zapisem zserializowanych danych sesji do BD.
Serializowana jest zwykła encja użytkownika
INSERT powodował urwanie zapytania zaraz przed nazwą id (s:44:" - tutaj kończyły się dane). Owrapowałem to wokół jsen_encode i okazuje się że jest tam Cytat ;s:44:\"\u0000User\\Entity... Skąd to się bierze w tym kodzie? Ten post edytował viking 25.10.2016, 08:51:00 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 965 Pomógł: 285 Dołączył: 19.06.2015 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Chyba z serialize - http://php.net/manual/en/function.serialize.php
Cytat Object's private members have the class name prepended to the member name; protected members have a '*' prepended to the member name. These prepended values have null bytes on either side. Cytat Returns a string containing a byte-stream representation of value that can be stored anywhere.
Note that this is a binary string which may include null bytes, and needs to be stored and handled as such. For example, serialize() output should generally be stored in a BLOB field in a database, rather than a CHAR or TEXT field. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 10.10.2025 - 02:22 |