我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

自动php回显HTMl特殊字符

I'm developing a php web app in Portuguese, but when I want to echo some word with special character, like:

ç õ â é

The echo prints the html equivalent. Is there any function that convertsthe special characters to their html equivalent?

Tks

I think you want to use htmlentities()

http://ch.php.net/manual/en/function.htmlentities.php

what is your page encoding? utf-8? and what is your file's encoding? try to set the file's encoding to UTF-8 without BOM and set page encoding to utf-8

近期文章

  • php error未定义变量:result1 help!
  • 更新功能失败并显示“严重性:通知”
  • Zend Framework Access数据库表对象
  • PHP检测Opera
  • get_file_contents执行PHP部分
  • 处理子节点和PHP foreach的混合列表
  • 在CakePHP中创建变量时需要VAR,我以为VAR被弃用了吗?
  • 陷入正则表达式我不知道是否有可能使用php preg_match_all
  • 我想进行查询,从几个表中检索多个列
  • YUI数据表错误排序
  • Mysql:查询没有执行
  • 外部站点使用Drupal 7进行身份验证
  • Zend从uri获取模型ID
  • 表格帖子上的白色屏幕
  • 将内容添加到变量
  • 比较字符串中关键字的流行度
  • 通过PHP从ajax访问MySQL数据库
  • Jquery AJAX:刷新<article>关于成功的内容?
  • 在某些版本的Chrome中,无法使用Javascript更改图像的src
  • 通过延迟将循环过程分解成部分,需要建议

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华