Guest User

Untitled

a guest
Jun 25th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2.   // define this variable in some config.file.php you include in your project
  3.   $global_config = array('CurrentStaticVersion' => '0.1');
  4.  
  5.   // returns /v-0.x/static/css/some.css
  6.   function getStaticUrl(path) {
  7.     return "/v-" . $global_config['CurrentStaticVersion'] . "/" . path;
  8.   }
  9. ?>
  10. <html>
  11. <head>
  12.   <title></title>
  13.   <link rel="stylesheet" type="text/css" href="<?php echo getStaticUrl('/static/css/some.css'); ?>" />
  14. </head>
  15. <body>
  16. </body>
  17. </html>
Add Comment
Please, Sign In to add comment