1
0

html.php 299 B

1234567891011121314
  1. <?php
  2. class HTML {
  3. public static function script($path) {
  4. if(!file_exists($path)) return;
  5. $modified_time = filemtime($path);
  6. $src = preg_replace("/^public\//", "/", $path);
  7. ?>
  8. <script type="text/javascript" src="<?=htmlspecialchars($src)?>?<?=$modified_time?>"></script>
  9. <?php
  10. }
  11. }
  12. ?>