Character Output - PHP Includes

2019-08-29 13:29发布

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.

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

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

Any suggestions?

Thanks!

1条回答
姐就是有狂的资本
2楼-- · 2019-08-29 14:11

Can't you use the utf8_encode function?

查看更多
登录 后发表回答