When connecting to mssql in php, I suddenly found that nvarchar was intercepted as 255, and the data was lost and text was intercepted. The following describes the solution in the manual. nvarchar is intercepted as 255 solution: PHP sets nv... when connecting to mssql in php, I suddenly found that nvarchar was intercepted as 255, and the data was lost and text was intercepted. The following describes the solution in the manual.
Nvarchar is intercepted as 255. solution:
PHP has processed nvarchar according to MySQL's varchar. the code is as follows:
Select cast (Target Field as text) from table name
If the summary field in your article table is nvarchar, run the following command:
Select cast (summary as text) from article
In another case, the text segment is intercepted:
MSSQL section of PHP configuration file php. ini:
[MSSQL]; Valid range 0-2147483647. Default = 4096. mssql. textlimit = 4096 // open source code phprm.com; Valid range 0-2147483647. Default = 4096. mssql. textsize = 4096
See the two configuration parameters:
; Valid range 0-2147483647. Default = 4096.
Mssql. textlimit = 4096
; Valid range 0-2147483647. Default = 4096.
Mssql. textsize = 4096
I believe you now know the key to the problem. you only need to increase the two values. However, you must also consider the following:
; Maximum size of POST data that PHP will accept.
Post_max_size = 2 M
Set according to the actual situation.