PHP使用Access数据库使用iconv导字符截断的有关问题

WBOY
Release: 2016-06-13 12:03:07
Original
879 people have browsed it

PHP使用Access数据库使用iconv导字符截断的问题
1.使用iconv导字符截断

<br /><br /><?php<br />header("content-type:text/html;charset=utf-8");<br />include 'conn.php'; <br />$query=odbc_do($conn,"select top 10 id,biaoti from news ");<br />//$num = 0;<br />while(odbc_fetch_row($query)){<br />?><br /><br /><a href="View.php?id=<?=odbc_result($query,1)?>"><?=iconv('gbk','utf-8//ignore',odbc_result($query,2))?></a><br /><br /><?php<br />echo "<br>";<br />}<br />?><br /><br />
Copy after login

------解决方案--------------------
是的,插入时如果超长是要报错的!
我也不知道你是怎么插入的
就算 biaoti 只按 50 读出数据,从而导致尾部乱码
但也不应该影响 neirong 的读取,而事实是 biaoti 超长时,neirong 就读取不到

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!