在PHP中,我的html打印出 到处都是 - 有修复吗?

0 html php special-characters

你好我有两个php文件.其中一个构建报告,第二个包含语言文本.当它打印时,即使我没有在我的代码中使用任何特殊字符,它仍然随处可见 特殊字符.为什么这样,我怎么能摆脱那些?

我正在运行Apache 2.2,php 5,Ubuntu 8.04.

文件1

<?php
function glossary() {
return <<<HTML
    <h1>Arteries</h1>
    <p><strong>Arteries</strong> are blood vessels that carry blood <strong>away from 
the heart</strong>. All arteries, with the exception of the pulmonary and umbilical 
arteries, carry oxygenated blood.   The circulatory system is extremely important for 
sustaining life. Its proper functioning is responsible for the delivery of oxygen 
and nutrients to all cells, as well as the removal of carbon dioxide and waste products, 
maintenance of optimum pH, and the mobility of the elements, proteins and cells of 
the immune system. In developed countries, the two leading causes of death, myocardial 
infarction and stroke each may directly result from an arterial system that has been 
slowly and progressively compromised by years of deterioration.</p>
HTML;
}
?>
Run Code Online (Sandbox Code Playgroud)

文件2:

<?php
require_once("language.php");

echo glossary();
?>
Run Code Online (Sandbox Code Playgroud)

这是我执行文件2时的打印输出.

词汇表动脉

动脉 血 船只从血液中携带血液.除肺动脉和脐动脉外,所有动脉均携带含氧血液.循环系统对于维持生命至关重要.它的正常功能是负责向所有细胞输送氧气和营养素,以及去除二氧化碳和废物,维持最佳的pH值,以及元素,蛋白质和细胞的流动性. the imune系统.在发达国家,导致死亡,心肌梗塞和卒中的两个主要原因可能直接源于动脉系统,该动脉系统由于多年恶化而缓慢且逐渐地受损.自身免疫

自身免疫性是指生物体无法识别其自身的组成部分,从而可以对自身的细胞和组织产生免疫反应.由这种异常免疫反应引起的任何疾病被称为自身免疫性疾病.基底细胞癌

基底细胞癌是最常见的皮肤癌类型.它很少被 化或杀死,但它仍然被认为是恶性的,因为它可以通过侵入周围组织而导致严重的破坏和毁容.据统计,大约有10名白种人在其一生中患上了基底细胞癌.在所有病例的80%中,头部和颈部都发现了基底细胞癌.近年来,躯干基底细胞癌的发病率似乎有所增加.

rya*_*nki 5

尝试删除并重新输入显示为" "的空格.

我怀疑你重新进入的人会很好.该文档可能包含备用Unicode空格字符,这些字符通常出现在编辑器中,但是在服务器的默认字符集中运行的PHP代码无法识别.

该文档最初来自MS Word还是其他文字处理器?