mssql_fetch_object文本字符限制? [英] mssql_fetch_object text character limit?

查看:52
本文介绍了mssql_fetch_object文本字符限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用mssql_fetch_object从MSSQL表中获取一些数据,但是文本似乎在页面上被切掉了.

I'm fetching some data from an MSSQL table using the mssql_fetch_object, but the text appears to cut off on the page.

表中的数据全部存在,但是在视图页面中似乎已切断.

The data is all there in the table, but it seems to cut off in the view page.

还有其他人遇到此问题,也许知道解决方法吗?这是我的代码;

Has anyone else encountered this problem and perhaps knows of a workaround? Here is my code;

<?php include('includes/session.php');
$query = "SELECT content FROM pages WHERE id = '11'";
$result = mssql_query($query);
$page = mssql_fetch_object($result);
?>

<div id="leftcol">
<?php echo stripslashes($page->content) ?>
</div>

推荐答案

我对在php中使用mssql不熟悉,但我只是尝试了一个使用mysql的示例而已.

I'm not familiar with using mssql in php, but I just tried an example using mysql without problem.

这对我来说可疑

VAR_DUMP()返回字符串(4096)

VAR_DUMP() returned string(4096)

所以我做了一些谷歌搜索,找到了这个链接

so I did some googling and found this link

建议您在php.ini中将mssql.textlimit和mssql.textsize更改为1048576(即2ˆ20),默认值为4096.希望有帮助.

It suggests to change mssql.textlimit and mssql.textsize to 1048576 (which is 2ˆ20) in your php.ini as the default is 4096. Hope that helps.

php.ini

  ; Valid range 0 - 2147483647.  Default = 4096.
  mssql.textlimit = 1048576
  ; Valid range 0 - 2147483647.  Default = 4096.
  mssql.textsize = 1048576

这篇关于mssql_fetch_object文本字符限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆