目前我在我的css文件中导入我的自定义字体如下:
<?php // 2.php
$getQuery = ""; // This is empty so it will redirect to 1 and show error message
session_start();
if(trim($getQuery) == ""){
$ERROR = "no search criteria entered";
$_SESSION['error'] = $ERROR;
if(!isset($_SESSION['error'])) {
die("the session error was not set for some reason");
}
$url = "1.php"; //index.php is page 1 in this case so I just redirect to the parent directory as index is loaded by default obviously in that case
header("Location:" . $url);
}
?>
一切都在当地完美无缺。在我将应用程序部署到AWS之后,我在控制台中看到以下错误:
@font-face {
font-family: 'Dinbek Light';
src: url('./fonts/DINbek-Light.ttf') format('truetype');
}
我已经搜索过其他资源,但无法提出解决方案。请注意,我使用Grunt构建应用程序,并且可以识别字体文件路径,如“资源”选项卡中所示:
字体样式默认为Times New Roman。任何建议将不胜感激!