您好,欢迎访问一九零五行业门户网

html_entity_decode有关问题

html_entity_decode问题
execute(select * from `aboutus` limit 1);
if (!$rs) print $conn->errormsg(); else print ok!;
print $rs->fields[profile_c];
?>
。。。。。。
=html_entity_decode($rs->fields[profile_c])?>
这段代码中 上面的print可以正确打印出 profile_c的内容,可是到了下面的html中显示的确是 “fields[profile_c])?>”。请问各位高手是什么问题啊
------解决方案--------------------
请确认你电脑上的php版本大于4.3.0,html_entity_decode这个函数是php4.3.0才引入的
------解决方案--------------------
你试试用手册上的这个函数试试
php codefunction unhtmlentities($string) { $trans_tbl = get_html_translation_table(html_entities); $trans_tbl = array_flip($trans_tbl); return strtr($string, $trans_tbl); }
------解决方案--------------------
你需要启用短写方式,即 php.ini 中
short_open_tag = on

其它类似信息

推荐信息