有没有其他方法在PHP中输出变量内容?

时间:2015-09-06 00:45:36

标签: php html css sass

我在我的框架中对scssphp进行了设置,并使其与多个文件一起使用。下面是将其自身输出为text / css的代码。

<?php header('Content-type: text/css');
ob_clean();



function scss_css() {
require "../SCSS-PHP/scss.inc.php";
$import_way = "../styles/scss/";
$compression = "scss_formatter_compressed";
$compiler_script = '@import "demo.scss"'; 

$scss = new scssc();
$scss->setImportPaths($import_way);
$scss->setFormatter($compression);

echo $scss->compile($compiler_script);
}
scss_css();
die();

?>

我在html中使用的调用是:

<link rel="stylesheet" href="binder/loader.scss.php">

我想知道echo对于我未来的scss设置是否安全。是否可以对此类文件输出进行任何攻击以及任何其他建议以使其更好?

0 个答案:

没有答案