这就是我所拥有的。我的 /root/ 文件夹中有一个 index php 页面,其中包含以下代码:
index.php
require_once("access/$template/head.php");
我的功能页面对 $template 代码有以下配置:
funcs.php
function getTemplateFiles() {
$directory = "models/site-templates/";
$languages = glob($directory . "*");
return $languages;
}
我的头 php 页面有以下代码:
头文件
<link rel='stylesheet' href='$template/css/style.css'>
我的问题是我可以添加什么代码到我的索引页面来与我的头页面通信,我的 $template 之前的代码将包含我的 php 页面的文件位置。
示例 1
$include_dir/$template/css/style.css'>
我的问题是如何包含我的索引页面的路径,以便我的头页面将像这样读取为 html?
默认,不起作用$template/css/style.css
仅索引页面需要这样access/$template/css/style.css