字体不会显示在php include的标题中

时间:2015-03-10 15:54:01

标签: php html css apache .htaccess

Screen shot of the page, include file above, without is below![

<div id = "headz">
<div class = "titlez">
<h1>Developing Software by Delacrank</h1>
</div>
</div>

] [Screen Shot PhP及之后]

.titlez {
    font-family: fantasy;
    font-size: xx-large;
    color: darkgreen;
    background-color: lightcyan;
}

#headz{
    text-align: center;
    margin-left: -2em;
    margin-right: -2em;
    padding-bottom: 1em;
    padding-top: 1em;
    background-color: black;
}
<!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" />
<title>Our first Website (Lists, Definitions and Tables)</title>
<link rel="stylesheet"
      type = "text/css"
      href="testcss.css">
</head>
<body>
<?php include('/Applications/XAMPP/xamppfiles/htdocs/includes/header.php'); ?>

最近我决定开始使用php来组织我的网站,其中包含html文件。目前,我正在使用带有apache服务器的xampp。我在我的服务器上添加了一个.htaccess文件('AddHandler application / x-httpd-php .htm .html'),以便它可以在我的html文件中使用php脚本。

一切似乎都很好,问题是当我从我的includes文件夹中添加文件时,链接到html页面的css样式工作正常,除了字体。 。 。我没有使用任何特殊字体,默认情况下显示的唯一字体似乎是快递,它不会显示幻想,时间,arial等。

我错过了什么,请帮助。

我将css文件添加到htdocs文件夹中,它显然找到它,因为其他样式工作正常。包含文件位于/ applications / xampp / xamppfiles / htdocs / includes /中。

我添加了代码的屏幕截图,上面是包含php,下面是没有php的相同代码。一切都是一样的唯一区别是字体的大小以及字体系列和字体颜色,所以字体中的任何内容都没有改变。

1 个答案:

答案 0 :(得分:0)

我解决了这个问题。原来这很简单,我添加了&lt; h1&gt;标签,当他们没有需要添加。 MEH。

相关问题