<?php
$path = WWW_ROOT."svelte/dist/assets" ;
$files = array_diff(scandir($path), array('.', '..'));
foreach($files AS $key => $val){
$file_parts = pathinfo($val);
if($file_parts['extension'] == 'js'){
?>
<script type="module" src="<?php echo Router::url('/', true) ; ?>svelte/dist/assets/<?php echo $val ; ?>"></script>
<?php
}else{
?>
<link rel="stylesheet" type="text/css" href="<?php echo Router::url('/', true) ; ?>svelte/dist/assets/<?php echo $val ; ?>">
<?php
}
}
?>Read Svelte dist File in php
by
Tags:
Leave a Reply