字符输出 - PHP包括 [英] Character Output - PHP Includes

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

问题描述

这里的问题 - 我的html doc类型标题如下:

Here the problem - my html doc type heading is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

如果我写一些包含£符号的文本,它会正确显示。

If I write some text which includes the '£' sign it displays correctly.

如果我包含使用'£'符号的php脚本,我会得到奇怪的字符输出:

If I include a php script which uses the '£' sign I get strange character output:

我知道我可以用html字符代码'£'替换£,但是因为我的网站很大,不实用。

I know that I can replace the £ with the html characters code '£' but since my site is large that is not practical.

任何建议?

谢谢!

推荐答案

您使用 utf8_encode 函数?

这篇关于字符输出 - PHP包括的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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