Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在php中包含css文件以隐藏文件夹结构?_Php_Css - Fatal编程技术网

如何在php中包含css文件以隐藏文件夹结构?

如何在php中包含css文件以隐藏文件夹结构?,php,css,Php,Css,top.php top.tpl $smarty->assign('style_url',STORE_URL.'csscon.php?store='.STORE_ID); $smarty->display(PATH.'top.tpl'); 如果查看源代码,它会显示所有CSS样式,但不会应用CSS。那么我如何应用这种风格呢 谢谢如果你把一个名为index.html的空白页面放在css文件夹中,如果有人进入,它将不会显示目录结构。如果你在查看源代码中看到css,然后单击该文件,看看你是否

top.php

top.tpl

$smarty->assign('style_url',STORE_URL.'csscon.php?store='.STORE_ID);
$smarty->display(PATH.'top.tpl');
如果查看源代码,它会显示所有CSS样式,但不会应用CSS。那么我如何应用这种风格呢


谢谢

如果你把一个名为index.html的空白页面放在css文件夹中,如果有人进入,它将不会显示目录结构。

如果你在查看源代码中看到css,然后单击该文件,看看你是否得到404(或检查控制台中的404),可能路径是错误的。这不是他要问的。我承认我对他想做的事情有点困惑。我以为他只是想隐藏文件夹结构。
<link rel="stylesheet" href="{$style_url}">
include PATH.'css/'.STORE_ID.'/css/style.css';