Php Smarty无法加载css文件?

Php Smarty无法加载css文件?,php,templates,smarty,Php,Templates,Smarty,所以,我最近发现Smarty,我必须说它是一个非常棒的模板引擎。不管是谁,我将在这个PHP CMS类型的软件工作 我试图让smarty处理userpanel/目录,同时处理public_html目录中index.php的其他模板调用 当前文件结构。 /主页/用户/公共\u html/ ../../includes/libs/templates/templates\u c/userpanel/ userpanel目录的索引文件。 user@userdomain.com[~/public\u htm

所以,我最近发现Smarty,我必须说它是一个非常棒的模板引擎。不管是谁,我将在这个PHP CMS类型的软件工作

我试图让smarty处理userpanel/目录,同时处理public_html目录中index.php的其他模板调用

当前文件结构。 /主页/用户/公共\u html/ ../../includes/libs/templates/templates\u c/userpanel/

userpanel目录的索引文件。 user@userdomain.com[~/public\u html/]cat userpanel/index.php

<?php
require '../libs/Smarty.class.php';

$smarty = new Smarty;

$smarty = new Smarty;
$smarty->setTemplateDir('../templates');
$smarty->assign('title', 'My CMS');
$smarty->assign('page', 'home');
$smarty->display('userpanel/main.tpl');


?>
userpanel是模板名称

/home/user/public_html/templates/userpanel
./  ../  content.tpl  css/  footer.tpl  header.tpl  main.tpl
下面是main.tpl中的代码,页脚/页眉/内容加载,但没有CSS

user@userdomain.com [~/public_html/templates/userpanel]# cat main.tpl 
<html>
<head>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
{include file='userpanel/header.tpl'}
{include file='userpanel/content.tpl'}
<br />
{include file='userpanel/footer.tpl'}
</body>
</html>
我尝试了templates/userpanel/css/style.css和userpanel/css/style.css

但这些都失败了

不管是谁,都要保持简短。对于我来说,在admin panel&index.php文件中使用Smarty的最佳方式是什么?为什么CSS文件没有加载

多谢各位

user@userdomain.com [~/public_html/templates/userpanel]# cat main.tpl 
<html>
<head>
<title>{$title}</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
{include file='userpanel/header.tpl'}
{include file='userpanel/content.tpl'}
<br />
{include file='userpanel/footer.tpl'}
</body>
</html>